1
Fork 0

Strip OpaqueCast during RevealAll.

This commit is contained in:
Oli Scherer 2023-09-27 11:20:17 +00:00
parent 479fa4a74d
commit 6ea2db7c2d
10 changed files with 57 additions and 26 deletions

View file

@ -316,7 +316,7 @@ where
{
use rustc_middle::mir::ProjectionElem::*;
Ok(match proj_elem {
OpaqueCast(ty) => base.transmute(self.layout_of(ty)?, self)?,
OpaqueCast(ty) => bug!("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(),