Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank""
This reverts commit 4a742a691e
.
This commit is contained in:
parent
5d664f7a8f
commit
40e2de8c41
30 changed files with 250 additions and 37 deletions
|
@ -1094,6 +1094,11 @@ macro_rules! visit_place_fns {
|
|||
self.visit_ty(&mut new_ty, TyContext::Location(location));
|
||||
if ty != new_ty { Some(PlaceElem::Field(field, new_ty)) } else { None }
|
||||
}
|
||||
PlaceElem::OpaqueCast(ty) => {
|
||||
let mut new_ty = ty;
|
||||
self.visit_ty(&mut new_ty, TyContext::Location(location));
|
||||
if ty != new_ty { Some(PlaceElem::OpaqueCast(new_ty)) } else { None }
|
||||
}
|
||||
PlaceElem::Deref
|
||||
| PlaceElem::ConstantIndex { .. }
|
||||
| PlaceElem::Subslice { .. }
|
||||
|
@ -1163,7 +1168,7 @@ macro_rules! visit_place_fns {
|
|||
location: Location,
|
||||
) {
|
||||
match elem {
|
||||
ProjectionElem::Field(_field, ty) => {
|
||||
ProjectionElem::OpaqueCast(ty) | ProjectionElem::Field(_, ty) => {
|
||||
self.visit_ty(ty, TyContext::Location(location));
|
||||
}
|
||||
ProjectionElem::Index(local) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue