mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Fill deprecation for LSP
This commit is contained in:
parent
569e1e871e
commit
852b083794
6 changed files with 86 additions and 23 deletions
|
@ -177,6 +177,16 @@ impl Attr {
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_named(&self) -> Option<SmolStr> {
|
||||
let tt = self.value()?;
|
||||
let attr = tt.syntax().children().nth(1)?;
|
||||
if attr.kind() == IDENT {
|
||||
Some(attr.leaf_text().unwrap().clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Comment {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue