From f3ee5a15090d8ba6ec220e1f907ed3af27e57734 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov <aleksey.kladov@gmail.com> Date: Fri, 9 Aug 2019 12:16:47 +0200 Subject: Move numeric names inside of `NameRef` --- crates/ra_syntax/src/validation/field_expr.rs | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 crates/ra_syntax/src/validation/field_expr.rs (limited to 'crates/ra_syntax/src/validation') 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 @@ -use crate::{ - ast::{self, FieldKind}, - SyntaxError, - SyntaxErrorKind::*, -}; - -pub(crate) fn validate_field_expr_node(node: ast::FieldExpr, errors: &mut Vec<SyntaxError>) { - if let Some(FieldKind::Index(idx)) = node.field_access() { - if idx.text().chars().any(|c| c < '0' || c > '9') { - errors.push(SyntaxError::new(InvalidTupleIndexFormat, idx.text_range())); - } - } -} -- cgit v1.2.3