about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-08 08:00:57 +0000
committerbors <bors@rust-lang.org>2022-09-08 08:00:57 +0000
commitb42244c2ab462a5ac4c901e8988f9fcb78776d9c (patch)
treef017d4d18075c776a6c1a4a5b33b157621703145 /compiler/rustc_trait_selection/src
parent44adfccffe34d14079b06ae459982b8600f84577 (diff)
parent7f46d7313c5c17571f8d44b020fe83869e676ed7 (diff)
downloadrust-b42244c2ab462a5ac4c901e8988f9fcb78776d9c.tar.gz
rust-b42244c2ab462a5ac4c901e8988f9fcb78776d9c.zip
Auto merge of #101560 - Dylan-DPC:rollup-8m8yr89, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #101153 (Migrate another part of rustc_infer to session diagnostic)
 - #101399 (Shrink span for bindings with subpatterns.)
 - #101422 (Hermit: Add File::set_time stub)
 - #101455 (Avoid UB in the Windows filesystem code in... bootstrap?)
 - #101498 (rustc: Parameterize `ty::Visibility` over used ID)
 - #101549 (Use HashStable_Generic in rustc_type_ir)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
index 9b8bb9e3620..efdb1ace139 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
@@ -1895,9 +1895,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
                         // FIXME(compiler-errors): This could be generalized, both to
                         // be more granular, and probably look past other `#[fundamental]`
                         // types, too.
-                        self.tcx
-                            .visibility(def.did())
-                            .is_accessible_from(body_id.owner.to_def_id(), self.tcx)
+                        self.tcx.visibility(def.did()).is_accessible_from(body_id.owner, self.tcx)
                     } else {
                         true
                     }