diff options
| author | bors <bors@rust-lang.org> | 2021-12-01 02:51:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-01 02:51:15 +0000 |
| commit | d384ff79308c4eb0a3679817cd0def0147ad8612 (patch) | |
| tree | b2ab6d98fbe14974fee2fbc802ce673978b3816f /compiler/rustc_mir_transform/src | |
| parent | 207c80f105282245d93024c95ac408c622f70114 (diff) | |
| parent | 7baafb1f5eba346a04b54c0501671dd0e1ad8aa4 (diff) | |
| download | rust-d384ff79308c4eb0a3679817cd0def0147ad8612.tar.gz rust-d384ff79308c4eb0a3679817cd0def0147ad8612.zip | |
Auto merge of #91406 - matthiaskrgr:rollup-a2whn8m, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #91294 (Visit type in process_projection_elem.) - #91340 (Bump compiler_builtins to 0.1.55 to bring in fixes for targets lackin…) - #91366 (Only show notable traits if both types are the same) - #91397 (Emit a warning on generic parameters with doc comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/dest_prop.rs | 22 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/reveal_all.rs | 20 |
2 files changed, 0 insertions, 42 deletions
diff --git a/compiler/rustc_mir_transform/src/dest_prop.rs b/compiler/rustc_mir_transform/src/dest_prop.rs index 790d9243fba..c45946a9e2a 100644 --- a/compiler/rustc_mir_transform/src/dest_prop.rs +++ b/compiler/rustc_mir_transform/src/dest_prop.rs @@ -316,28 +316,6 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> { } } - fn process_projection_elem( - &mut self, - elem: PlaceElem<'tcx>, - _: Location, - ) -> Option<PlaceElem<'tcx>> { - match elem { - PlaceElem::Index(local) => { - if let Some(replacement) = self.replacements.for_src(local) { - bug!( - "cannot replace {:?} with {:?} in index projection {:?}", - local, - replacement, - elem, - ); - } else { - None - } - } - _ => None, - } - } - fn visit_place(&mut self, place: &mut Place<'tcx>, context: PlaceContext, location: Location) { if let Some(replacement) = self.replacements.for_src(place.local) { // Rebase `place`s projections onto `replacement`'s. diff --git a/compiler/rustc_mir_transform/src/reveal_all.rs b/compiler/rustc_mir_transform/src/reveal_all.rs index 6c423a2bb57..3bcb71b64f4 100644 --- a/compiler/rustc_mir_transform/src/reveal_all.rs +++ b/compiler/rustc_mir_transform/src/reveal_all.rs @@ -35,24 +35,4 @@ impl<'tcx> MutVisitor<'tcx> for RevealAllVisitor<'tcx> { fn visit_ty(&mut self, ty: &mut Ty<'tcx>, _: TyContext) { *ty = self.tcx.normalize_erasing_regions(self.param_env, ty); } - - #[inline] - fn process_projection_elem( - &mut self, - elem: PlaceElem<'tcx>, - _: Location, - ) -> Option<PlaceElem<'tcx>> { - match elem { - PlaceElem::Field(field, ty) => { - let new_ty = self.tcx.normalize_erasing_regions(self.param_env, ty); - if ty != new_ty { Some(PlaceElem::Field(field, new_ty)) } else { None } - } - // None of those contain a Ty. - PlaceElem::Index(..) - | PlaceElem::Deref - | PlaceElem::ConstantIndex { .. } - | PlaceElem::Subslice { .. } - | PlaceElem::Downcast(..) => None, - } - } } |
