mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Move numeric names inside of NameRef
This commit is contained in:
parent
5f82012779
commit
f3ee5a1509
10 changed files with 52 additions and 37 deletions
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue