@@ -101,8 +101,6 @@ pub trait NonConstOp: std::fmt::Debug {
101101#[ derive( Debug ) ]
102102pub struct Abort ;
103103impl NonConstOp for Abort {
104- const STOPS_CONST_CHECKING : bool = true ;
105-
106104 fn status_in_item ( & self , ccx : & ConstCx < ' _ , ' _ > ) -> Status {
107105 mcf_status_in_item ( ccx)
108106 }
@@ -115,8 +113,6 @@ impl NonConstOp for Abort {
115113#[ derive( Debug ) ]
116114pub struct FloatingPointOp ;
117115impl NonConstOp for FloatingPointOp {
118- const STOPS_CONST_CHECKING : bool = true ;
119-
120116 fn status_in_item ( & self , ccx : & ConstCx < ' _ , ' _ > ) -> Status {
121117 if ccx. const_kind ( ) == hir:: ConstContext :: ConstFn {
122118 Status :: Unstable ( sym:: const_fn_floating_point_arithmetic)
@@ -136,20 +132,6 @@ impl NonConstOp for FloatingPointOp {
136132 }
137133}
138134
139- #[ derive( Debug ) ]
140- pub struct NonPrimitiveOp ;
141- impl NonConstOp for NonPrimitiveOp {
142- const STOPS_CONST_CHECKING : bool = true ;
143-
144- fn status_in_item ( & self , ccx : & ConstCx < ' _ , ' _ > ) -> Status {
145- mcf_status_in_item ( ccx)
146- }
147-
148- fn emit_error ( & self , ccx : & ConstCx < ' _ , ' _ > , span : Span ) {
149- mcf_emit_error ( ccx, span, "only int, `bool` and `char` operations are stable in const fn" )
150- }
151- }
152-
153135/// A function call where the callee is a pointer.
154136#[ derive( Debug ) ]
155137pub struct FnCallIndirect ;
@@ -234,8 +216,6 @@ impl NonConstOp for FnPtrCast {
234216#[ derive( Debug ) ]
235217pub struct Generator ;
236218impl NonConstOp for Generator {
237- const STOPS_CONST_CHECKING : bool = true ;
238-
239219 fn status_in_item ( & self , ccx : & ConstCx < ' _ , ' _ > ) -> Status {
240220 // FIXME: This means generator-only MIR is only forbidden in const fn. This is for
241221 // compatibility with the old code. Such MIR should be forbidden everywhere.
@@ -512,8 +492,6 @@ impl NonConstOp for ThreadLocalAccess {
512492#[ derive( Debug ) ]
513493pub struct Transmute ;
514494impl NonConstOp for Transmute {
515- const STOPS_CONST_CHECKING : bool = true ;
516-
517495 fn status_in_item ( & self , ccx : & ConstCx < ' _ , ' _ > ) -> Status {
518496 if ccx. const_kind ( ) != hir:: ConstContext :: ConstFn {
519497 Status :: Allowed
@@ -660,8 +638,6 @@ pub mod ty {
660638 #[ derive( Debug ) ]
661639 pub struct TraitBoundNotConst ;
662640 impl NonConstOp for TraitBoundNotConst {
663- const STOPS_CONST_CHECKING : bool = true ;
664-
665641 fn status_in_item ( & self , _: & ConstCx < ' _ , ' _ > ) -> Status {
666642 Status :: Unstable ( sym:: const_trait_bound_opt_out)
667643 }
0 commit comments