From f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 20 Jul 2019 12:58:27 +0300 Subject: rename range -> text_range --- crates/ra_syntax/src/validation/block.rs | 5 +++-- crates/ra_syntax/src/validation/field_expr.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/ra_syntax/src/validation') diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs index f5573bd8f..c5588658d 100644 --- a/crates/ra_syntax/src/validation/block.rs +++ b/crates/ra_syntax/src/validation/block.rs @@ -16,6 +16,7 @@ pub(crate) fn validate_block_node(node: ast::Block, errors: &mut Vec {} } } - errors - .extend(node.attrs().map(|attr| SyntaxError::new(InvalidBlockAttr, attr.syntax().range()))) + errors.extend( + node.attrs().map(|attr| SyntaxError::new(InvalidBlockAttr, attr.syntax().text_range())), + ) } diff --git a/crates/ra_syntax/src/validation/field_expr.rs b/crates/ra_syntax/src/validation/field_expr.rs index 0e18bd9ca..004f199fd 100644 --- a/crates/ra_syntax/src/validation/field_expr.rs +++ b/crates/ra_syntax/src/validation/field_expr.rs @@ -7,7 +7,7 @@ use crate::{ pub(crate) fn validate_field_expr_node(node: ast::FieldExpr, errors: &mut Vec) { 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.range())); + errors.push(SyntaxError::new(InvalidTupleIndexFormat, idx.text_range())); } } } -- cgit v1.2.3