diff options
| author | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-08-20 11:02:40 +0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-08-21 09:32:34 -0700 |
| commit | f0f182dcb73adf0ef37adc3fdcf9158cf6afadfa (patch) | |
| tree | 6518aba8db4743c7fd1f1d376ffe1cefb002de17 /compiler | |
| parent | fd942a5e01b8d0c432e47044c353df015a2a6b1f (diff) | |
| download | rust-f0f182dcb73adf0ef37adc3fdcf9158cf6afadfa.tar.gz rust-f0f182dcb73adf0ef37adc3fdcf9158cf6afadfa.zip | |
Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn> (cherry picked from commit 27e6726cb82d413f623715dfa099d2b8410e016a)
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index c182fd99b17..5d39f3343ea 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -2876,7 +2876,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // we check if `TraitB` can be reachable from `S` // to determine whether to note `TraitA` is sealed trait. if let ty::Adt(adt, _) = ty.kind() { - let visibilities = tcx.effective_visibilities(()); + let visibilities = &tcx.resolutions(()).effective_visibilities; visibilities.effective_vis(local).is_none_or(|v| { v.at_level(Level::Reexported) .is_accessible_from(adt.did(), tcx) |
