add name resolution from the old impl
unlike the old impl, this also handles macro imports across crates
This commit is contained in:
@@ -114,6 +114,9 @@ pub trait AttrsOwner: AstNode {
|
||||
fn attrs(&self) -> AstChildren<Attr> {
|
||||
children(self)
|
||||
}
|
||||
fn has_atom_attr(&self, atom: &str) -> bool {
|
||||
self.attrs().filter_map(|x| x.as_atom()).any(|x| x == atom)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait DocCommentsOwner: AstNode {
|
||||
@@ -153,12 +156,6 @@ pub trait DocCommentsOwner: AstNode {
|
||||
}
|
||||
}
|
||||
|
||||
impl FnDef {
|
||||
pub fn has_atom_attr(&self, atom: &str) -> bool {
|
||||
self.attrs().filter_map(|x| x.as_atom()).any(|x| x == atom)
|
||||
}
|
||||
}
|
||||
|
||||
impl Attr {
|
||||
pub fn is_inner(&self) -> bool {
|
||||
let tt = match self.value() {
|
||||
|
||||
Reference in New Issue
Block a user