mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Smarter bracketed use diagnostic
This commit is contained in:
parent
848e817f60
commit
6eeec5d75f
2 changed files with 14 additions and 0 deletions
|
@ -193,6 +193,14 @@ impl ast::UseTreeList {
|
|||
.and_then(ast::UseTree::cast)
|
||||
.expect("UseTreeLists are always nested in UseTrees")
|
||||
}
|
||||
|
||||
pub fn has_inner_comment(&self) -> bool {
|
||||
self.syntax()
|
||||
.children_with_tokens()
|
||||
.filter_map(|it| it.into_token())
|
||||
.find_map(ast::Comment::cast)
|
||||
.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::Impl {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue