1
Fork 0

Skip reinterning if nothing changed

This commit is contained in:
Oli Scherer 2023-09-27 11:23:39 +00:00
parent 6ea2db7c2d
commit 2d4201f7c6
3 changed files with 7 additions and 9 deletions

View file

@ -316,7 +316,9 @@ where
{
use rustc_middle::mir::ProjectionElem::*;
Ok(match proj_elem {
OpaqueCast(ty) => bug!("OpaqueCast({ty}) encountered after borrowck"),
OpaqueCast(ty) => {
span_bug!(self.cur_span(), "OpaqueCast({ty}) encountered after borrowck")
}
Field(field, _) => self.project_field(base, field.index())?,
Downcast(_, variant) => self.project_downcast(base, variant)?,
Deref => self.deref_pointer(&base.to_op(self)?)?.into(),