Remove spurious format

This commit is contained in:
Schuyler Cohen 2022-01-19 13:37:25 -06:00
parent 6a64d3c4df
commit 11cb203daf

View file

@ -13,7 +13,6 @@ pub fn is_format_string(string: &ast::String) -> bool {
// //
// This setup lets us correctly highlight the components of `concat!("{}", "bla")` format // This setup lets us correctly highlight the components of `concat!("{}", "bla")` format
// strings. It still fails for `concat!("{", "}")`, but that is rare. // strings. It still fails for `concat!("{", "}")`, but that is rare.
format!("{string} {bar}", bar = string);
(|| { (|| {
let macro_call = string.syntax().ancestors().find_map(ast::MacroCall::cast)?; let macro_call = string.syntax().ancestors().find_map(ast::MacroCall::cast)?;
let name = macro_call.path()?.segment()?.name_ref()?; let name = macro_call.path()?.segment()?.name_ref()?;