You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@hawkw mentioned to me that it'd be very helpful if rust-analyzer could include the usages of std::fmt::Debug and std::fmt::Display inside calls to format!.
I don't think #19130 is a prerequisite, we can do it as well without it, but I don't see how we can do that reasonably: the only textual thing we can search for is format!() (and friends), and I assume it'll have a lot of false positives that will be expensive to validate.
This isn't really generally doable. Sure we could search for format!, format_args! and println!, but then that only works for those. It won't work for tracing templates for example, or any other third party macro that we aren't hardcoding (and we won't be hardcoding any crate macros here). If rust had f"" strings instead of stupid macros this would be actually doable though
Do we need to hardcode macros beyond a reasonable starting set? I imagine we could have a few default options and expose a configuration option to add additional macros.
@hawkw mentioned to me that it'd be very helpful if rust-analyzer could include the usages of
std::fmt::Debug
andstd::fmt::Display
inside calls toformat!
.I assume #19130 is a necessary pre-requisite.
The text was updated successfully, but these errors were encountered: