diff options
| author | bors <bors@rust-lang.org> | 2023-07-20 16:57:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-20 16:57:05 +0000 |
| commit | 092e4f46be168ab24d53e4141086b2cf04822b8e (patch) | |
| tree | 319a736d758b0d3fc9a9eabf1333c987ca96fa9e /compiler/rustc_hir_analysis | |
| parent | 06a53ddc0bd3a50f9bcf2f7c373011dc7869f59f (diff) | |
| parent | 464e02a26713c92caf635f2fd037e95043a17343 (diff) | |
| download | rust-092e4f46be168ab24d53e4141086b2cf04822b8e.tar.gz rust-092e4f46be168ab24d53e4141086b2cf04822b8e.zip | |
Auto merge of #113890 - matthiaskrgr:rollup-k1w2vii, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #110765 (rustdoc: fix position of `default` in method rendering) - #113529 (Permit pre-evaluated constants in simd_shuffle) - #113800 (Avoid another gha group nesting) - #113827 (Add Foreign, Never, FnDef, Closure and Generator tys to SMIR) - #113835 (new solver: don't consider blanket impls multiple times) - #113883 (Remove outdated Firefox-specific CSS for search's crate selector appearance) - #113884 (Don't translate compiler-internal bug messages) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/coherence/orphan.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/coherence/orphan.rs b/compiler/rustc_hir_analysis/src/coherence/orphan.rs index 05c78f57088..21ffbefcd08 100644 --- a/compiler/rustc_hir_analysis/src/coherence/orphan.rs +++ b/compiler/rustc_hir_analysis/src/coherence/orphan.rs @@ -568,10 +568,10 @@ fn fast_reject_auto_impl<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, self_ty: impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for DisableAutoTraitVisitor<'tcx> { type BreakTy = (); - fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { + fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { let tcx = self.tcx; - if t != self.self_ty_root { - for impl_def_id in tcx.non_blanket_impls_for_ty(self.trait_def_id, t) { + if ty != self.self_ty_root { + for impl_def_id in tcx.non_blanket_impls_for_ty(self.trait_def_id, ty) { match tcx.impl_polarity(impl_def_id) { ImplPolarity::Negative => return ControlFlow::Break(()), ImplPolarity::Reservation => {} @@ -584,7 +584,7 @@ fn fast_reject_auto_impl<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, self_ty: } } - match t.kind() { + match ty.kind() { ty::Adt(def, args) if def.is_phantom_data() => args.visit_with(self), ty::Adt(def, args) => { // @lcnr: This is the only place where cycles can happen. We avoid this @@ -599,7 +599,7 @@ fn fast_reject_auto_impl<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, self_ty: ControlFlow::Continue(()) } - _ => t.super_visit_with(self), + _ => ty.super_visit_with(self), } } } |
