-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Invalid help suggestion when vec
macro incorrectly used without !
#101490
Comments
Did not bisect, but this is probably caused by #100334. |
LOL at the new suggestion anyway, yes confirmed the bisection points to a rollup merge with contains #100334 cc @TaKO8Ki searched nightlies: from nightly-2022-07-13 to nightly-2022-09-06 bisected with cargo-bisect-rustc v0.6.3Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 2022-07-13 --preserve I'll try to dig further back in time to find where we lost the correct diagnostic message EDIT: the diagnostic we had previously was introduced in Rust 1.18 so basically I think we never really suggested the right thing ("adding the |
…or-macro-without-exclamation-mark, r=wesleywiser Do not suggest a semicolon for a macro without `!` Fixes a regression in rust-lang#101490
The regression that causes the compiler to emit the invalid help suggestion is fixed by #101502
However, as mentioned in the top of this issue, it is still not ideal. |
Doing the "correct" thing and emitting an always correct "add |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-low +regression-from-stable-to-stable -regression-from-stable-to-nightly |
The current output is back to what it originally was
I don't think it qualifies as a regression anymore, but it would be great still to make the output be the following instead
|
Given the following code: link
The current output is:
Just for some context this is the current error message for the stable and beta versions:
Which is also not ideal as for the other std macros AFAIK (only checked a few), incorrect usage (i.e. without the
!
) will lead to a help suggestion informing the user to include a!
to invoke a macro (e.g.print
,println
).Hence, the ideal output is to suggest adding the
!
when invoking thevec
macro incorrectly as with other macros.@rustbot label +regression-from-stable-to-nightly +D-invalid-suggestion
May need a bisect.
The text was updated successfully, but these errors were encountered: