Skip to content

Commit

Permalink
Assert that we don't convert unevaluated MIR promoteds to unevaluated…
Browse files Browse the repository at this point in the history
… type constants
  • Loading branch information
oli-obk committed Jun 26, 2023
1 parent acdfec6 commit 1c992c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_middle/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2581,10 +2581,9 @@ pub struct UnevaluatedConst<'tcx> {
}

impl<'tcx> UnevaluatedConst<'tcx> {
// FIXME: probably should get rid of this method. It's also wrong to
// shrink and then later expand a promoted.
#[inline]
pub fn shrink(self) -> ty::UnevaluatedConst<'tcx> {
assert_eq!(self.promoted, None);
ty::UnevaluatedConst { def: self.def, substs: self.substs }
}
}
Expand Down

0 comments on commit 1c992c0

Please sign in to comment.