diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-03 20:11:40 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-03 20:11:40 +0100 |
commit | 6207ac90da7e607218457bf872fa32df6b78f224 (patch) | |
tree | 222a315a1522e1cd99589233674e259303b56395 /crates/ra_syntax | |
parent | cde92d0fe1ad33706dc0804e3c39e4ef9a5e12b9 (diff) | |
parent | a5e8dfd0247648d8108386f4f98b3af0e48181f7 (diff) |
Merge #3840
3840: Add parens for enums r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 392731dac..bf7d137be 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -325,6 +325,9 @@ impl ast::BindPat { | |||
325 | pub fn is_ref(&self) -> bool { | 325 | pub fn is_ref(&self) -> bool { |
326 | self.syntax().children_with_tokens().any(|n| n.kind() == T![ref]) | 326 | self.syntax().children_with_tokens().any(|n| n.kind() == T![ref]) |
327 | } | 327 | } |
328 | pub fn has_at(&self) -> bool { | ||
329 | self.syntax().children_with_tokens().any(|it| it.kind() == T![@]) | ||
330 | } | ||
328 | } | 331 | } |
329 | 332 | ||
330 | pub struct SlicePatComponents { | 333 | pub struct SlicePatComponents { |