@@ -48,11 +48,6 @@ bitflags::bitflags! {
48
48
// Refers to temporaries which cannot be promoted as
49
49
// promote_consts decided they weren't simple enough.
50
50
const NOT_PROMOTABLE = 1 << 3 ;
51
-
52
- // Const items can only have MUTABLE_INTERIOR
53
- // and NOT_PROMOTABLE without producing an error.
54
- const CONST_ERROR = !Qualif :: MUTABLE_INTERIOR . bits &
55
- !Qualif :: NOT_PROMOTABLE . bits;
56
51
}
57
52
}
58
53
@@ -419,13 +414,13 @@ impl<'a, 'tcx> Qualifier<'a, 'tcx> {
419
414
} ;
420
415
421
416
// Bail out on oon-`const fn` calls or if the callee had errors.
422
- if !is_const_fn || self . qualify_operand ( callee) . intersects ( Qualif :: CONST_ERROR ) {
417
+ if !is_const_fn || self . qualify_operand ( callee) . intersects ( Qualif :: NOT_CONST ) {
423
418
return Qualif :: NOT_CONST ;
424
419
}
425
420
426
421
// Bail out if any arguments had errors.
427
422
for arg in args {
428
- if self . qualify_operand ( arg) . intersects ( Qualif :: CONST_ERROR ) {
423
+ if self . qualify_operand ( arg) . intersects ( Qualif :: NOT_CONST ) {
429
424
return Qualif :: NOT_CONST ;
430
425
}
431
426
}
@@ -668,7 +663,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
668
663
669
664
// Account for errors in consts by using the
670
665
// conservative type qualification instead.
671
- if qualif. intersects ( Qualif :: CONST_ERROR ) {
666
+ if qualif. intersects ( Qualif :: NOT_CONST ) {
672
667
qualif = self . qualifier ( ) . qualify_any_value_of_ty ( mir. return_ty ( ) ) ;
673
668
}
674
669
0 commit comments