aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-09 11:17:47 +0100
committerbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-09 11:17:47 +0100
commite3f8e6023d66ceb37040833bf317d77019bb10f1 (patch)
treed4042c35679ca1e4db06fd9976d90d025fca0966 /crates/ra_syntax/src/validation
parent5f82012779c374d9f6b518634aefb14ce28e17e6 (diff)
parentf3ee5a15090d8ba6ec220e1f907ed3af27e57734 (diff)
Merge #1673
1673: Move numeric names inside of `NameRef` r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/validation')
-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}