11321: Remove spurious format r=lnicola a=schuyler-cohen-zipline



Co-authored-by: Schuyler Cohen <schuyler.cohen@flyzipline.com>
This commit is contained in:
bors[bot] 2022-01-19 20:01:41 +00:00 committed by GitHub
commit df53403863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()?;