-
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
Off-by-one in suggested fix for typos in macro names #47418
Labels
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.
T-dev-tools
Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Comments
nrc
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.
T-dev-tools
Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
labels
Jan 13, 2018
This was referenced Jan 14, 2018
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jan 16, 2018
…suggestion, r=estebank Don't include bang in macro replacement suggestion When we suggest the replacement for a macro we include the "!" in the suggested replacement but the span only contains the name of the macro itself. Using that replacement would cause a duplicate "!" in the resulting code. I originally tried to extend the span to be replaced by 1 byte in rust-lang#47424. However, @zackmdavis pointed out that there can be whitespace between the macro name and the bang. Instead, just remove the bang from the suggested replacement. Fixes rust-lang#47418 r? @estebank
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jan 16, 2018
…suggestion, r=estebank Don't include bang in macro replacement suggestion When we suggest the replacement for a macro we include the "!" in the suggested replacement but the span only contains the name of the macro itself. Using that replacement would cause a duplicate "!" in the resulting code. I originally tried to extend the span to be replaced by 1 byte in rust-lang#47424. However, @zackmdavis pointed out that there can be whitespace between the macro name and the bang. Instead, just remove the bang from the suggested replacement. Fixes rust-lang#47418 r? @estebank
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Jan 17, 2018
…suggestion, r=estebank Don't include bang in macro replacement suggestion When we suggest the replacement for a macro we include the "!" in the suggested replacement but the span only contains the name of the macro itself. Using that replacement would cause a duplicate "!" in the resulting code. I originally tried to extend the span to be replaced by 1 byte in rust-lang#47424. However, @zackmdavis pointed out that there can be whitespace between the macro name and the bang. Instead, just remove the bang from the suggested replacement. Fixes rust-lang#47418 r? @estebank
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Jan 17, 2018
…suggestion, r=estebank Don't include bang in macro replacement suggestion When we suggest the replacement for a macro we include the "!" in the suggested replacement but the span only contains the name of the macro itself. Using that replacement would cause a duplicate "!" in the resulting code. I originally tried to extend the span to be replaced by 1 byte in rust-lang#47424. However, @zackmdavis pointed out that there can be whitespace between the macro name and the bang. Instead, just remove the bang from the suggested replacement. Fixes rust-lang#47418 r? @estebank
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
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-dev-tools
Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Consider the following program:
Relevant part of the
rustc .\src\main.rs --error-format=json
output:So it suggests to replace fragment "panec" with "panic!", which results in extra exclamation point.
The text was updated successfully, but these errors were encountered: