diff options
Diffstat (limited to 'compiler/rustc_middle/src/ty/assoc.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/assoc.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/assoc.rs b/compiler/rustc_middle/src/ty/assoc.rs index af2d26b0579..e18737c0d7c 100644 --- a/compiler/rustc_middle/src/ty/assoc.rs +++ b/compiler/rustc_middle/src/ty/assoc.rs @@ -46,7 +46,6 @@ pub struct AssocItem { pub def_id: DefId, pub name: Symbol, pub kind: AssocKind, - pub vis: Visibility, pub container: AssocItemContainer, /// If this is an item in an impl of a trait then this is the `DefId` of @@ -67,6 +66,11 @@ impl AssocItem { tcx.impl_defaultness(self.def_id) } + #[inline] + pub fn visibility(&self, tcx: TyCtxt<'_>) -> Visibility { + tcx.visibility(self.def_id) + } + pub fn signature(&self, tcx: TyCtxt<'_>) -> String { match self.kind { ty::AssocKind::Fn => { |
