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

Rollup of 8 pull requests #60683

Merged
merged 27 commits into from
May 10, 2019
Merged

Rollup of 8 pull requests #60683

merged 27 commits into from
May 10, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented May 9, 2019

Successful merges:

Failed merges:

r? @ghost

tesaguri and others added 27 commits April 24, 2019 20:24
There are some expressions that can be parsed as a statement without
a trailing semicolon depending on the context, which can lead to
confusing errors due to the same looking code being accepted in some
places and not others. Identify these cases and suggest enclosing in
parenthesis making the parse non-ambiguous without changing the
accepted grammar.
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 doesn't work anymore, and its continued
presence is cause for confusion.
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.
…=arielb1

Clean up and add tests for slice drop shims

Adds a test for the MIR generated by `real_drop_in_place::<[T]>`. Also slightly reduces the number of statements and locals used in the shim.

r? @RalfJung
Identify when a stmt could have been parsed as an expr

There are some expressions that can be parsed as a statement without
a trailing semicolon depending on the context, which can lead to
confusing errors due to the same looking code being accepted in some
places and not others. Identify these cases and suggest enclosing in
parenthesis making the parse non-ambiguous without changing the
accepted grammar.

Fix rust-lang#54186, cc rust-lang#54482, fix rust-lang#59975, fix rust-lang#47287.
std: Derive `Default` for `io::Cursor`

I think this change is quite obvious, so made it insta-stable, but I won't insist on that.
Comment ext::tt::transcribe

Also did a bit of minor cleanup (remove unidiomatic use of `Add` and an unneeded `clone`). No functionality changes.

r? @petrochenkov
Skip codegen for one UI test with long file path

The path to this test is so long that object files produced by it hit some path length limit on Windows and linker cannot find them.
The workaround here is to skip codegen and avoid producing object files, this test doesn't need them anyway.
remove unneeded `extern crate`s from build tools
…akis,Centril

Remove the old await! macro

This doesn't work anymore, and its continued presence is cause for confusion. `yield` can no longer be used to return `Pending` from an `async` body.

cc rust-lang#60660
cc @taiki-e
cc tokio-rs/tokio#1080
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
@Centril
Copy link
Contributor Author

Centril commented May 9, 2019

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented May 9, 2019

📌 Commit 45b0945 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 9, 2019
@bors
Copy link
Contributor

bors commented May 10, 2019

⌛ Testing commit 45b0945 with merge 03bd2f6...

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
@bors
Copy link
Contributor

bors commented May 10, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 03bd2f6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 10, 2019
@bors bors merged commit 45b0945 into rust-lang:master May 10, 2019
@Centril Centril deleted the rollup-p05qh5d branch May 10, 2019 03:43
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

10 participants