-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Syntax highlighting in macros like println!
and format_args!
is awesome! Unfortunately, it doesn't seem to work with tracing
macros as I would expect it to, since the expansion appears to use format_args!
similarly to other cases. Example:
So far, I have not been able to reproduce this using my own macro definition, and the upstream tracing::event
has a fairly big + complicated definition, but one match arm does use format_args!
and the expansion contains this:
Some(
&(unsafe {
std::fmt::Arguments::new_v1(
&[],
&[std::fmt::ArgumentV1::new(
&("not highlighted"),
std::fmt::Display::fmt,
)],
)
}) as &Value,
),
Please let me know if there's anything I can do to help track down why this expansion doesn't match the criteria for highlighting. Thanks!
rust-analyzer version: rust-analyzer version: 84be2ea 2022-05-23 stable
rustc version: rustc 1.61.0 (fe5b13d68 2022-05-18)
relevant settings: None that I know of