@@ -384,7 +384,7 @@ impl<'tcx> NonConstOp<'tcx> for HeapAllocation {
384384 ccx. dcx ( ) . create_err ( errors:: UnallowedHeapAllocations {
385385 span,
386386 kind : ccx. const_kind ( ) ,
387- teach : ccx. tcx . sess . teach ( E0010 ) . then_some ( ( ) ) ,
387+ teach : ccx. tcx . sess . teach ( E0010 ) ,
388388 } )
389389 }
390390}
@@ -444,16 +444,16 @@ impl<'tcx> NonConstOp<'tcx> for CellBorrow {
444444 if let hir:: ConstContext :: Static ( _) = ccx. const_kind ( ) {
445445 ccx. dcx ( ) . create_err ( errors:: InteriorMutableDataRefer {
446446 span,
447- opt_help : Some ( ( ) ) ,
447+ opt_help : true ,
448448 kind : ccx. const_kind ( ) ,
449- teach : ccx. tcx . sess . teach ( E0492 ) . then_some ( ( ) ) ,
449+ teach : ccx. tcx . sess . teach ( E0492 ) ,
450450 } )
451451 } else {
452452 ccx. dcx ( ) . create_err ( errors:: InteriorMutableDataRefer {
453453 span,
454- opt_help : None ,
454+ opt_help : false ,
455455 kind : ccx. const_kind ( ) ,
456- teach : ccx. tcx . sess . teach ( E0492 ) . then_some ( ( ) ) ,
456+ teach : ccx. tcx . sess . teach ( E0492 ) ,
457457 } )
458458 }
459459 }
@@ -481,12 +481,12 @@ impl<'tcx> NonConstOp<'tcx> for MutBorrow {
481481 hir:: BorrowKind :: Raw => ccx. tcx . dcx ( ) . create_err ( errors:: UnallowedMutableRaw {
482482 span,
483483 kind : ccx. const_kind ( ) ,
484- teach : ccx. tcx . sess . teach ( E0764 ) . then_some ( ( ) ) ,
484+ teach : ccx. tcx . sess . teach ( E0764 ) ,
485485 } ) ,
486486 hir:: BorrowKind :: Ref => ccx. dcx ( ) . create_err ( errors:: UnallowedMutableRefs {
487487 span,
488488 kind : ccx. const_kind ( ) ,
489- teach : ccx. tcx . sess . teach ( E0764 ) . then_some ( ( ) ) ,
489+ teach : ccx. tcx . sess . teach ( E0764 ) ,
490490 } ) ,
491491 }
492492 }
0 commit comments