diff options
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 819fabdd1f1..bca3c7b1b03 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -750,27 +750,12 @@ impl<'a> NameBinding<'a> { fn is_possibly_imported_variant(&self) -> bool { match self.kind { NameBindingKind::Import { binding, .. } => binding.is_possibly_imported_variant(), - _ => self.is_variant(), - } - } - - // We sometimes need to treat variants as `pub` for backwards compatibility. - fn pseudo_vis(&self) -> ty::Visibility { - if self.is_variant() && self.res().def_id().is_local() { - ty::Visibility::Public - } else { - self.vis - } - } - - fn is_variant(&self) -> bool { - matches!( - self.kind, NameBindingKind::Res( Res::Def(DefKind::Variant | DefKind::Ctor(CtorOf::Variant, ..), _), _, - ) - ) + ) => true, + NameBindingKind::Res(..) | NameBindingKind::Module(..) => false, + } } fn is_extern_crate(&self) -> bool { |
