Implement use associated items of traits
This commit is contained in:
@@ -920,10 +920,13 @@ impl<'ra> NameBindingData<'ra> {
|
||||
}
|
||||
|
||||
fn is_importable(&self) -> bool {
|
||||
!matches!(
|
||||
self.res(),
|
||||
Res::Def(DefKind::AssocConst | DefKind::AssocFn | DefKind::AssocTy, _)
|
||||
)
|
||||
!matches!(self.res(), Res::Def(DefKind::AssocTy, _))
|
||||
}
|
||||
|
||||
// FIXME(import_trait_associated_functions): associate `const` or `fn` are not importable unless
|
||||
// the feature `import_trait_associated_functions` is enable
|
||||
fn is_assoc_const_or_fn(&self) -> bool {
|
||||
matches!(self.res(), Res::Def(DefKind::AssocConst | DefKind::AssocFn, _))
|
||||
}
|
||||
|
||||
fn macro_kind(&self) -> Option<MacroKind> {
|
||||
|
||||
Reference in New Issue
Block a user