1
Fork 0

Remove visibility from AssocItem.

This commit is contained in:
Camille GILLOT 2022-03-12 21:40:43 +01:00
parent 110f0656cb
commit 8ee4446ee5
7 changed files with 12 additions and 15 deletions

View file

@ -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 => {