diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-09-08 11:55:09 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-08 11:55:09 +0530 |
| commit | 12b810063dc87bc985e8aab8d0fa2179add2610f (patch) | |
| tree | 8ee6fd5e03e2d2913a9c70baa1c4f7d395e78d3e /compiler/rustc_trait_selection/src/traits | |
| parent | 1c3559676265f2c320f4e361fece080b0f464f97 (diff) | |
| parent | d8d3b83e3ae6ade8498862d8c110c302abf859d9 (diff) | |
| download | rust-12b810063dc87bc985e8aab8d0fa2179add2610f.tar.gz rust-12b810063dc87bc985e8aab8d0fa2179add2610f.zip | |
Rollup merge of #101498 - petrochenkov:visparam, r=cjgillot
rustc: Parameterize `ty::Visibility` over used ID It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 4 |
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 } |
