aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation/field_expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/validation/field_expr.rs')
-rw-r--r--crates/ra_syntax/src/validation/field_expr.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/crates/ra_syntax/src/validation/field_expr.rs b/crates/ra_syntax/src/validation/field_expr.rs
deleted file mode 100644
index 004f199fd..000000000
--- a/crates/ra_syntax/src/validation/field_expr.rs
+++ /dev/null
@@ -1,13 +0,0 @@
1use crate::{
2 ast::{self, FieldKind},
3 SyntaxError,
4 SyntaxErrorKind::*,
5};
6
7pub(crate) fn validate_field_expr_node(node: ast::FieldExpr, errors: &mut Vec<SyntaxError>) {
8 if let Some(FieldKind::Index(idx)) = node.field_access() {
9 if idx.text().chars().any(|c| c < '0' || c > '9') {
10 errors.push(SyntaxError::new(InvalidTupleIndexFormat, idx.text_range()));
11 }
12 }
13}