-
Notifications
You must be signed in to change notification settings - Fork 13.3k
non_fmt_panics suggestion applied many times when it appears inside a macro_rules #88115
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
@estebank Is this a known problem with suggestions inside macro_rules definitions? |
Oh, that definitely looks like a previously existing outstanding bug :-/ I also noticed this other issue as well:
|
That other issue looks confusing because the surrounding assert!(
alpha != 254 && alpha != 253,
format!("alpha value: {}, {:?}", alpha, filter)
); but the error is correct. (It could suggest removing warning
|
@estebank So I assume there's no existing mechanism for 'deduplicating' suggestions like that, such that they only appear on the first macro invocation or something? :( |
I believe we have a mechanism to do that, but it might be relying on the What's the timeline for the edition? |
We have 17 days until 1.56 branches off. In 10'000 crates we only ran into this twice though, so it doesn't seem like a big issue; definitely not a blocker. |
It seems to work fine though when the suggestion is to replace |
https://twitter.com/artichokeruby/status/1427720656817332227
|
Less than ideal, but I think it is acceptable to go out of the door with this unaddressed. We should fix it soonish regardless. |
This is an instance of rust-lang/cargo#13027. Closing this as duplicate. |
This showed up in a small crater run for the 2021 edition migrations:
The suggestion gets applied for every usage of the macro, resulting in:
The text was updated successfully, but these errors were encountered: