mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
Don't classify NameRef paths inside attribute TokenTrees
This commit is contained in:
parent
1b9b2d1f40
commit
04f1104179
3 changed files with 22 additions and 14 deletions
|
@ -336,6 +336,14 @@ impl ast::Path {
|
|||
pub fn qualifiers(&self) -> impl Iterator<Item = ast::Path> + Clone {
|
||||
successors(self.qualifier(), |p| p.qualifier())
|
||||
}
|
||||
|
||||
pub fn top_path(&self) -> ast::Path {
|
||||
let mut this = self.clone();
|
||||
while let Some(path) = this.parent_path() {
|
||||
this = path;
|
||||
}
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::Use {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue