diff options
Diffstat (limited to 'crates/ra_syntax/src/validation')
-rw-r--r-- | crates/ra_syntax/src/validation/block.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/validation/field_expr.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs index 46650d9b0..f5573bd8f 100644 --- a/crates/ra_syntax/src/validation/block.rs +++ b/crates/ra_syntax/src/validation/block.rs | |||
@@ -5,7 +5,7 @@ use crate::{ | |||
5 | SyntaxKind::*, | 5 | SyntaxKind::*, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | pub(crate) fn validate_block_node(node: &ast::Block, errors: &mut Vec<SyntaxError>) { | 8 | pub(crate) fn validate_block_node(node: ast::Block, errors: &mut Vec<SyntaxError>) { |
9 | if let Some(parent) = node.syntax().parent() { | 9 | if let Some(parent) = node.syntax().parent() { |
10 | match parent.kind() { | 10 | match parent.kind() { |
11 | FN_DEF => return, | 11 | FN_DEF => return, |
diff --git a/crates/ra_syntax/src/validation/field_expr.rs b/crates/ra_syntax/src/validation/field_expr.rs index d3020edf7..0e18bd9ca 100644 --- a/crates/ra_syntax/src/validation/field_expr.rs +++ b/crates/ra_syntax/src/validation/field_expr.rs | |||
@@ -4,7 +4,7 @@ use crate::{ | |||
4 | SyntaxErrorKind::*, | 4 | SyntaxErrorKind::*, |
5 | }; | 5 | }; |
6 | 6 | ||
7 | pub(crate) fn validate_field_expr_node(node: &ast::FieldExpr, errors: &mut Vec<SyntaxError>) { | 7 | pub(crate) fn validate_field_expr_node(node: ast::FieldExpr, errors: &mut Vec<SyntaxError>) { |
8 | if let Some(FieldKind::Index(idx)) = node.field_access() { | 8 | if let Some(FieldKind::Index(idx)) = node.field_access() { |
9 | if idx.text().chars().any(|c| c < '0' || c > '9') { | 9 | if idx.text().chars().any(|c| c < '0' || c > '9') { |
10 | errors.push(SyntaxError::new(InvalidTupleIndexFormat, idx.range())); | 10 | errors.push(SyntaxError::new(InvalidTupleIndexFormat, idx.range())); |