diff options
author | Josh Robson Chase <[email protected]> | 2019-01-23 18:14:34 +0000 |
---|---|---|
committer | Josh Robson Chase <[email protected]> | 2019-01-23 18:19:49 +0000 |
commit | 3b70acad0106e4ffe5ee68d565c9130b5b271e22 (patch) | |
tree | 72b32afb919c5317219c0891ced8c9725d622bbc /crates/ra_syntax/src/ast.rs | |
parent | 1cd6d6539a9d85bc44db364bb9165e6d9253790d (diff) |
Use IDENT for both raw and normal idents
Diffstat (limited to 'crates/ra_syntax/src/ast.rs')
-rw-r--r-- | crates/ra_syntax/src/ast.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 4d8412d46..bcbd4c60c 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -142,7 +142,7 @@ impl Attr { | |||
142 | pub fn as_atom(&self) -> Option<SmolStr> { | 142 | pub fn as_atom(&self) -> Option<SmolStr> { |
143 | let tt = self.value()?; | 143 | let tt = self.value()?; |
144 | let (_bra, attr, _ket) = tt.syntax().children().collect_tuple()?; | 144 | let (_bra, attr, _ket) = tt.syntax().children().collect_tuple()?; |
145 | if attr.kind().is_ident() { | 145 | if attr.kind() == IDENT { |
146 | Some(attr.leaf_text().unwrap().clone()) | 146 | Some(attr.leaf_text().unwrap().clone()) |
147 | } else { | 147 | } else { |
148 | None | 148 | None |
@@ -153,7 +153,7 @@ impl Attr { | |||
153 | let tt = self.value()?; | 153 | let tt = self.value()?; |
154 | let (_bra, attr, args, _ket) = tt.syntax().children().collect_tuple()?; | 154 | let (_bra, attr, args, _ket) = tt.syntax().children().collect_tuple()?; |
155 | let args = TokenTree::cast(args)?; | 155 | let args = TokenTree::cast(args)?; |
156 | if attr.kind().is_ident() { | 156 | if attr.kind() == IDENT { |
157 | Some((attr.leaf_text().unwrap().clone(), args)) | 157 | Some((attr.leaf_text().unwrap().clone(), args)) |
158 | } else { | 158 | } else { |
159 | None | 159 | None |