-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rustc suggests incorrect fixes (#[warn(unused_parens)]
)
#117380
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
he-thinks
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Oct 30, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Oct 30, 2023
@rustbot claim |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 30, 2023
…Nilstrieb Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes rust-lang#117380
saethlin
added
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Oct 30, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 30, 2023
…Nilstrieb Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes rust-lang#117380
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Oct 30, 2023
…Nilstrieb Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes rust-lang#117380
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Oct 30, 2023
…Nilstrieb Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes rust-lang#117380
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 30, 2023
Rollup merge of rust-lang#117395 - gurry:117380-wrong-parent-sugg, r=Nilstrieb Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes rust-lang#117380
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Rustc suggests incorrect fixes for #[warn(unused_parens)] for these patterns.
Other cases
No response
Anything else?
Rustc version:
(the same issue with the stable 1.73.0 rustc).
The text was updated successfully, but these errors were encountered: