mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-18 00:00:03 +00:00
Add initial (flawed) implementation of binding annotations
This commit is contained in:
parent
9433a108cf
commit
d48d5b8b6c
7 changed files with 97 additions and 5 deletions
|
@ -713,6 +713,16 @@ impl FieldPatList {
|
|||
}
|
||||
}
|
||||
|
||||
impl BindPat {
|
||||
pub fn is_mutable(&self) -> bool {
|
||||
self.syntax().children().any(|n| n.kind() == MUT_KW)
|
||||
}
|
||||
|
||||
pub fn is_ref(&self) -> bool {
|
||||
self.syntax().children().any(|n| n.kind() == REF_KW)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_doc_comment_of_items() {
|
||||
let file = SourceFile::parse(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue