@@ -384,7 +384,7 @@ impl<'tcx> NonConstOp<'tcx> for HeapAllocation {
384
384
ccx. dcx ( ) . create_err ( errors:: UnallowedHeapAllocations {
385
385
span,
386
386
kind : ccx. const_kind ( ) ,
387
- teach : ccx. tcx . sess . teach ( E0010 ) . then_some ( ( ) ) ,
387
+ teach : ccx. tcx . sess . teach ( E0010 ) ,
388
388
} )
389
389
}
390
390
}
@@ -444,16 +444,16 @@ impl<'tcx> NonConstOp<'tcx> for CellBorrow {
444
444
if let hir:: ConstContext :: Static ( _) = ccx. const_kind ( ) {
445
445
ccx. dcx ( ) . create_err ( errors:: InteriorMutableDataRefer {
446
446
span,
447
- opt_help : Some ( ( ) ) ,
447
+ opt_help : true ,
448
448
kind : ccx. const_kind ( ) ,
449
- teach : ccx. tcx . sess . teach ( E0492 ) . then_some ( ( ) ) ,
449
+ teach : ccx. tcx . sess . teach ( E0492 ) ,
450
450
} )
451
451
} else {
452
452
ccx. dcx ( ) . create_err ( errors:: InteriorMutableDataRefer {
453
453
span,
454
- opt_help : None ,
454
+ opt_help : false ,
455
455
kind : ccx. const_kind ( ) ,
456
- teach : ccx. tcx . sess . teach ( E0492 ) . then_some ( ( ) ) ,
456
+ teach : ccx. tcx . sess . teach ( E0492 ) ,
457
457
} )
458
458
}
459
459
}
@@ -481,12 +481,12 @@ impl<'tcx> NonConstOp<'tcx> for MutBorrow {
481
481
hir:: BorrowKind :: Raw => ccx. tcx . dcx ( ) . create_err ( errors:: UnallowedMutableRaw {
482
482
span,
483
483
kind : ccx. const_kind ( ) ,
484
- teach : ccx. tcx . sess . teach ( E0764 ) . then_some ( ( ) ) ,
484
+ teach : ccx. tcx . sess . teach ( E0764 ) ,
485
485
} ) ,
486
486
hir:: BorrowKind :: Ref => ccx. dcx ( ) . create_err ( errors:: UnallowedMutableRefs {
487
487
span,
488
488
kind : ccx. const_kind ( ) ,
489
- teach : ccx. tcx . sess . teach ( E0764 ) . then_some ( ( ) ) ,
489
+ teach : ccx. tcx . sess . teach ( E0764 ) ,
490
490
} ) ,
491
491
}
492
492
}
0 commit comments