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 5 pull requests #66686

Merged
merged 17 commits into from
Nov 24, 2019
Merged

Rollup of 5 pull requests #66686

merged 17 commits into from
Nov 24, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Nov 24, 2019

Successful merges:

Failed merges:

r? @ghost

jonhoo and others added 17 commits September 27, 2019 17:36
This places the temporaries that `format!` generates to refer to its
arguments (through `&dyn Trait`) in a short-lived scope surrounding just
the invocation of `format!`. This enables `format!` to be used in
generators without the temporaries preventing the generator from being
`Send` (due to `dyn Trait` not being `Sync`).

See rust-lang#64477 for details.
Fixes rust-lang#61577

When printing an opaque type in non-verbose mode, we use the
`tcx.predicates_of` query to retrieve the opaque type's bounds for
pretty-printing. However, the pervasiveness of logging within librustc
means that we may already be executing `tcx.predicates_of` for the
opaque type we're trying to print, leading to a cycle error.

This commit adds a new 'no queries' thread-local flag to the pretty
printer. This flag is enabled during the computation of `predicates_of`
for opaque types, and causes us to print the opaque type in 'verbose'
mode (which does not require computing any additinal queries). This
should only affect debug logging for highly nested log messages, not any
user-visible output.
Scope format! temporaries

This places the temporaries that `format!` generates to refer to its arguments (through `&dyn Trait`) in a short-lived scope surrounding just the invocation of `format!`. This enables `format!` to be used in generators without the temporaries preventing the generator from being `Send` (due to `dyn Trait` not being `Sync`).

See rust-lang#64477 for details.
…matthewjasper

Fix cycle when debug-printing opaque types

Fixes rust-lang#61577

When printing an opaque type in non-verbose mode, we use the
`tcx.predicates_of` query to retrieve the opaque type's bounds for
pretty-printing. However, the pervasiveness of logging within librustc
means that we may already be executing `tcx.predicates_of` for the
opaque type we're trying to print, leading to a cycle error.

This commit adds a new 'no queries' thread-local flag to the pretty
printer. This flag is enabled during the computation of `predicates_of`
for opaque types, and causes us to print the opaque type in 'verbose'
mode (which does not require computing any additinal queries). This
should only affect debug logging for highly nested log messages, not any
user-visible output.
parser: recover on nested ADTs as enum variants

Closes: rust-lang#66127
@Centril
Copy link
Contributor Author

Centril commented Nov 24, 2019

@bors r+ p=100 rollup=never

@bors
Copy link
Contributor

bors commented Nov 24, 2019

📌 Commit d22bf91 has been approved by Centril

@bors
Copy link
Contributor

bors commented Nov 24, 2019

🌲 The tree is currently closed for pull requests below priority 10, this pull request will be tested once the tree is reopened

@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 Nov 24, 2019
@Centril Centril added the rollup A PR which is a rollup label Nov 24, 2019
@bors
Copy link
Contributor

bors commented Nov 24, 2019

⌛ Testing commit d22bf91 with merge e41ced3...

bors added a commit that referenced this pull request Nov 24, 2019
Rollup of 5 pull requests

Successful merges:

 - #64856 (Scope format! temporaries)
 - #66411 (mem::forget docs: mention ManuallyDrop)
 - #66594 (Fix cycle when debug-printing opaque types)
 - #66641 (parser: recover on nested ADTs as enum variants)
 - #66659 (make `./x.py bench` again)

Failed merges:

r? @ghost
@Centril
Copy link
Contributor Author

Centril commented Nov 24, 2019

@bors treeclosed-

@bors
Copy link
Contributor

bors commented Nov 24, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing e41ced3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 24, 2019
@bors bors merged commit d22bf91 into rust-lang:master Nov 24, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #66686!

Tested on commit e41ced3.
Direct link to PR: #66686

💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Nov 24, 2019
Tested on commit rust-lang/rust@e41ced3.
Direct link to PR: <rust-lang/rust#66686>

💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
@bors bors mentioned this pull request Nov 24, 2019
@Centril Centril deleted the rollup-07slyoo branch November 24, 2019 16:40
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.

7 participants