Skip to content
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

Don't include bang in macro replacement suggestion #47444

Merged
merged 1 commit into from
Jan 17, 2018
Merged

Don't include bang in macro replacement suggestion #47444

merged 1 commit into from
Jan 17, 2018

Conversation

etaoins
Copy link
Contributor

@etaoins etaoins commented Jan 15, 2018

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 #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 #47418

r? @estebank

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
#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 #47418
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 15, 2018

📌 Commit ecd47a9 has been approved by estebank

@estebank estebank added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 15, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request 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 pull request 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
bors added a commit that referenced this pull request Jan 16, 2018
Rollup of 6 pull requests

- Successful merges: #47250, #47302, #47387, #47398, #47436, #47444
- Failed merges:
bors added a commit that referenced this pull request Jan 17, 2018
Rollup of 6 pull requests

- Successful merges: #47250, #47302, #47387, #47398, #47436, #47444
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request 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 pull request 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
bors added a commit that referenced this pull request Jan 17, 2018
@bors bors merged commit ecd47a9 into rust-lang:master Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants