From b1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Apr 2020 23:40:41 +0200 Subject: Convert code to text-size --- crates/ra_hir_expand/src/builtin_macro.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_expand/src/builtin_macro.rs') diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 3da137f2e..2ccebda28 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs @@ -2,7 +2,7 @@ use crate::db::AstDatabase; use crate::{ ast::{self, AstToken, HasStringValue}, - name, AstId, CrateId, MacroDefId, MacroDefKind, TextUnit, + name, AstId, CrateId, MacroDefId, MacroDefKind, TextSize, }; use crate::{quote, EagerMacroId, LazyMacroId, MacroCallId}; @@ -127,7 +127,7 @@ fn stringify_expand( let arg = loc.kind.arg(db).ok_or_else(|| mbe::ExpandError::UnexpectedToken)?; let macro_args = arg; let text = macro_args.text(); - let without_parens = TextUnit::of_char('(')..text.len() - TextUnit::of_char(')'); + let without_parens = TextSize::of('(')..text.len() - TextSize::of(')'); text.slice(without_parens).to_string() }; -- cgit v1.2.3