Skip to content

Commit 1c992c0

Browse files
committed
Assert that we don't convert unevaluated MIR promoteds to unevaluated type constants
1 parent acdfec6 commit 1c992c0

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+1
-2
lines changed

compiler/rustc_middle/src/mir/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2581,10 +2581,9 @@ pub struct UnevaluatedConst<'tcx> {
25812581
}
25822582

25832583
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.
25862584
#[inline]
25872585
pub fn shrink(self) -> ty::UnevaluatedConst<'tcx> {
2586+
assert_eq!(self.promoted, None);
25882587
ty::UnevaluatedConst { def: self.def, substs: self.substs }
25892588
}
25902589
}

0 commit comments

Comments
 (0)