Introduce opaque type to hidden type projection
This commit is contained in:
parent
116819f54f
commit
84a444a1f4
23 changed files with 97 additions and 6 deletions
|
@ -652,6 +652,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
|
||||
ProjectionElem::ConstantIndex { .. }
|
||||
| ProjectionElem::Downcast(..)
|
||||
| ProjectionElem::OpaqueCast(..)
|
||||
| ProjectionElem::Subslice { .. }
|
||||
| ProjectionElem::Field(..)
|
||||
| ProjectionElem::Index(_) => {}
|
||||
|
|
|
@ -316,6 +316,7 @@ where
|
|||
|
||||
ProjectionElem::Deref
|
||||
| ProjectionElem::Field(_, _)
|
||||
| ProjectionElem::OpaqueCast(_)
|
||||
| ProjectionElem::ConstantIndex { .. }
|
||||
| ProjectionElem::Subslice { .. }
|
||||
| ProjectionElem::Downcast(_, _)
|
||||
|
|
|
@ -361,7 +361,7 @@ impl<'tcx> Validator<'_, 'tcx> {
|
|||
return Err(Unpromotable);
|
||||
}
|
||||
}
|
||||
ProjectionElem::Downcast(..) => {
|
||||
ProjectionElem::OpaqueCast(..) | ProjectionElem::Downcast(..) => {
|
||||
return Err(Unpromotable);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue