-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Diagnostic assumes that braced unresolved identifiers are formatting arguments #141350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We might be able to fix this by marking the span with However, even then we'd need to be wary of cases like |
Great case, I'll look at adding |
@rustbot claim |
Also CC @mejrs to whom I recently also suggested to create |
I did not get that far with the implementation of the desugaring aspect of it, that turned out to be more complicated than I thought. Feel free to take it if you want. Just some thought:
|
Here are some notes as I'm going along, and feel free to make some suggestions. I've found that marking span at I also tried to mark I need to do some more investigation to see if I can mark elsewhere. |
In rustc_resolve we should at least be able to tell if we're in an expansion of some particular macros, using the Another way would be to revert #141213 and instead just tell the user to write |
Uh oh!
There was an error while loading. Please reload this page.
Uplifted from #141213 (comment). Given
the compiler outputs
Notice the (unstructured) suggestion
you might have meant to use the available field in a format string: `"{}", self.field`
which is obviously incorrect, there's no format string in sight andfn method(&self) { "{}", self.field; }
is butchered.For context, this regressed in PR #141213.
Version Information
The text was updated successfully, but these errors were encountered: