diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/node_ext.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/node_ext.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index 30c2db56b..69726fb93 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs | |||
@@ -362,26 +362,6 @@ impl ast::TypeBound { | |||
362 | unreachable!() | 362 | unreachable!() |
363 | } | 363 | } |
364 | } | 364 | } |
365 | |||
366 | pub fn const_question_token(&self) -> Option<SyntaxToken> { | ||
367 | self.syntax() | ||
368 | .children_with_tokens() | ||
369 | .filter_map(|it| it.into_token()) | ||
370 | .take_while(|it| it.kind() != T![const]) | ||
371 | .find(|it| it.kind() == T![?]) | ||
372 | } | ||
373 | |||
374 | pub fn question_token(&self) -> Option<SyntaxToken> { | ||
375 | if self.const_token().is_some() { | ||
376 | self.syntax() | ||
377 | .children_with_tokens() | ||
378 | .filter_map(|it| it.into_token()) | ||
379 | .skip_while(|it| it.kind() != T![const]) | ||
380 | .find(|it| it.kind() == T![?]) | ||
381 | } else { | ||
382 | support::token(&self.syntax, T![?]) | ||
383 | } | ||
384 | } | ||
385 | } | 365 | } |
386 | 366 | ||
387 | pub enum VisibilityKind { | 367 | pub enum VisibilityKind { |