mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Add const_format_args!
builtin macro, fix highlighting
This commit is contained in:
parent
12fe0e4ffe
commit
b994469a13
5 changed files with 35 additions and 10 deletions
|
@ -38,6 +38,9 @@ fn is_format_string(string: &ast::String) -> Option<()> {
|
|||
return None;
|
||||
}
|
||||
|
||||
// NB: we match against `panic_2015`/`panic_2021` here because they have a special-cased arm for
|
||||
// `"{}"`, which otherwise wouldn't get highlighted.
|
||||
|
||||
let first_literal = parent
|
||||
.children_with_tokens()
|
||||
.find_map(|it| it.as_token().cloned().and_then(ast::String::cast))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue