Assert that we don't convert unevaluated MIR promoteds to unevaluated… · rust-lang/rust@1c992c0 (original) (raw)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -2581,10 +2581,9 @@ pub struct UnevaluatedConst<'tcx> {
2581 2581 }
2582 2582
2583 2583 impl<'tcx> UnevaluatedConst<'tcx> {
2584 -// FIXME: probably should get rid of this method. It's also wrong to
2585 -// shrink and then later expand a promoted.
2586 2584 #[inline]
2587 2585 pub fn shrink(self) -> ty::UnevaluatedConst<'tcx> {
2586 +assert_eq!(self.promoted, None);
2588 2587 ty::UnevaluatedConst { def: self.def, substs: self.substs }
2589 2588 }
2590 2589 }