-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix async desugaring providing wrong input to procedural macros. #60676
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds a regression test (with current broken behaviour) that tests that `mut` patterns are not lost when provided as input to a proc macro.
This commit removes the modification of the mutability of simple bindings. While the mutability isn't used, it is important that it is kept so that the input to procedural macros matches what the user wrote. This commit also modifies the span of the binding mode so that it is considered a compiler desugaring and won't be linted against for being unused..
This is unrelated to the rest of this PR but it made sense to add a FIXME explaining that the function shouldn't really be in the parser.
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
May 9, 2019
@bors r+ |
📌 Commit d5e0406 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
May 9, 2019
Centril
reviewed
May 9, 2019
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 9, 2019
Fix async desugaring providing wrong input to procedural macros. Fixes rust-lang#60674. This PR fixes a minor oversight introduced by rust-lang#60535 where unused `mut` binding modes were removed from the arguments to an `async fn` (as they were added to the statement that we insert into the closure body). However, this meant that the input to procedural macros was incorrect. This removes that and instead fixes the `unused_mut` error that it avoided. r? @cramertj cc @taiki-e
bors
added a commit
that referenced
this pull request
May 10, 2019
Rollup of 8 pull requests Successful merges: - #59348 (Clean up and add tests for slice drop shims) - #60188 (Identify when a stmt could have been parsed as an expr) - #60234 (std: Derive `Default` for `io::Cursor`) - #60618 (Comment ext::tt::transcribe) - #60648 (Skip codegen for one UI test with long file path) - #60671 (remove unneeded `extern crate`s from build tools) - #60675 (Remove the old await! macro) - #60676 (Fix async desugaring providing wrong input to procedural macros.) Failed merges: r? @ghost
davidtwco
added a commit
to davidtwco/rust
that referenced
this pull request
May 10, 2019
At request of `@centril`, this commit extends the existing test added by rust-lang#60676 to include nested `mut` patterns.
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 10, 2019
Extend rust-lang#60676 test for nested mut patterns. At request of @Centril, this commit extends the existing test added by rust-lang#60676 to include nested `mut` patterns. cc @Centril
bors
added a commit
that referenced
this pull request
May 10, 2019
Rollup of 6 pull requests Successful merges: - #60529 (RFC 2008: Uninhabitedness fixes for enum variants and tests) - #60620 (Fix a couple of FIXMEs in ext::tt::transcribe) - #60659 (Tweak `Symbol` and `InternedString`) - #60692 (Extend #60676 test for nested mut patterns.) - #60697 (add regression test for #60629) - #60701 (Update mailmap for mati865) Failed merges: r? @ghost
8 tasks
davidtwco
pushed a commit
to davidtwco/rust
that referenced
this pull request
Jun 3, 2019
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of rust-lang#60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b0945, reversing changes made to f6df1f6. Revert "Rollup merge of rust-lang#60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a5, reversing changes made to 12bf981. Revert "Rollup merge of rust-lang#59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574, reversing changes made to 4eff852.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #60674.
This PR fixes a minor oversight introduced by #60535 where unused
mut
binding modes were removed from the arguments to anasync fn
(as they were added to the statement that we insert into the closure body). However, this meant that the input to procedural macros was incorrect. This removes that and instead fixes theunused_mut
error that it avoided.r? @cramertj
cc @taiki-e