aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast.rs')
-rw-r--r--crates/ra_syntax/src/ast.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 4b7edbbe7..0ee9ef199 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -713,6 +713,16 @@ impl FieldPatList {
713 } 713 }
714} 714}
715 715
716impl BindPat {
717 pub fn is_mutable(&self) -> bool {
718 self.syntax().children().any(|n| n.kind() == MUT_KW)
719 }
720
721 pub fn is_ref(&self) -> bool {
722 self.syntax().children().any(|n| n.kind() == REF_KW)
723 }
724}
725
716#[test] 726#[test]
717fn test_doc_comment_of_items() { 727fn test_doc_comment_of_items() {
718 let file = SourceFile::parse( 728 let file = SourceFile::parse(