Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/syntax_helpers/format_string.rs')
| -rw-r--r-- | crates/ide-db/src/syntax_helpers/format_string.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-db/src/syntax_helpers/format_string.rs b/crates/ide-db/src/syntax_helpers/format_string.rs index 8836167630..b3e227ddd2 100644 --- a/crates/ide-db/src/syntax_helpers/format_string.rs +++ b/crates/ide-db/src/syntax_helpers/format_string.rs @@ -4,7 +4,7 @@ use syntax::{ TextRange, TextSize, }; -use super::node_ext::get_outer_macro_name; +use super::node_ext::get_outer_macro; pub fn is_format_string(string: &ast::String) -> bool { // Check if `string` is a format string argument of a macro invocation. @@ -16,7 +16,7 @@ pub fn is_format_string(string: &ast::String) -> bool { // This setup lets us correctly highlight the components of `concat!("{}", "bla")` format // strings. It still fails for `concat!("{", "}")`, but that is rare. (|| { - let name = get_outer_macro_name(string)?; + let name = get_outer_macro(string)?.path()?.segment()?.name_ref()?; if !matches!( name.text().as_str(), |