Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d60d88f

Browse files
committedJul 20, 2022
Auto merge of rust-lang#99495 - oli-obk:revert_98582, r=oli-obk
Revert "Rollup merge of rust-lang#98582 - oli-obk:unconstrained_opaque_type, r… …=estebank" This reverts commit 6f8fb91, reversing changes made to 7210e46. r? `@ghost` rebase of rust-lang#99368
2 parents 748cb1f + 4a742a6 commit d60d88f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+205
-396
lines changed
 

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,9 +2155,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
21552155
}
21562156
StorageDeadOrDrop::Destructor(_) => kind,
21572157
},
2158-
ProjectionElem::OpaqueCast { .. }
2159-
| ProjectionElem::Field(..)
2160-
| ProjectionElem::Downcast(..) => {
2158+
ProjectionElem::Field(..) | ProjectionElem::Downcast(..) => {
21612159
match place_ty.ty.kind() {
21622160
ty::Adt(def, _) if def.has_dtor(tcx) => {
21632161
// Report the outermost adt with a destructor

‎compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
226226
}
227227
ProjectionElem::Downcast(..) if including_downcast.0 => return None,
228228
ProjectionElem::Downcast(..) => (),
229-
ProjectionElem::OpaqueCast(..) => (),
230229
ProjectionElem::Field(field, _ty) => {
231230
// FIXME(project-rfc_2229#36): print capture precisely here.
232231
if let Some(field) = self.is_upvar_field_projection(PlaceRef {
@@ -287,7 +286,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
287286
PlaceRef { local, projection: proj_base }.ty(self.body, self.infcx.tcx)
288287
}
289288
ProjectionElem::Downcast(..) => place.ty(self.body, self.infcx.tcx),
290-
ProjectionElem::OpaqueCast(ty) => PlaceTy::from_ty(*ty),
291289
ProjectionElem::Field(_, field_type) => PlaceTy::from_ty(*field_type),
292290
},
293291
};

0 commit comments

Comments
 (0)
This repository has been archived.