Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank
Allow patterns to constrain the hidden type of opaque types fixes #96572 reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864) TODO: * check if https://github.com/rust-lang/rust/issues/99685 is avoided
This commit is contained in:
commit
4136b59b7d
40 changed files with 384 additions and 179 deletions
|
@ -893,7 +893,7 @@ where
|
|||
}
|
||||
ty::Slice(ety) => self.open_drop_for_array(*ety, None),
|
||||
|
||||
_ => bug!("open drop from non-ADT `{:?}`", ty),
|
||||
_ => span_bug!(self.source_info.span, "open drop from non-ADT `{:?}`", ty),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ impl<'tcx> Lift for PlaceElem<'tcx> {
|
|||
match *self {
|
||||
ProjectionElem::Deref => ProjectionElem::Deref,
|
||||
ProjectionElem::Field(f, ty) => ProjectionElem::Field(f, ty.lift()),
|
||||
ProjectionElem::OpaqueCast(ty) => ProjectionElem::OpaqueCast(ty.lift()),
|
||||
ProjectionElem::Index(ref i) => ProjectionElem::Index(i.lift()),
|
||||
ProjectionElem::Subslice { from, to, from_end } => {
|
||||
ProjectionElem::Subslice { from, to, from_end }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue