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

Closed
wants to merge 28 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 19, 2020

Successful merges:

Failed merges:

r? @ghost

oli-obk and others added 28 commits March 11, 2020 13:55
…d a long lost assertion

This reverts part of commit 9712fa4.
Co-Authored-By: Ralf Jung <[email protected]>
This commit modifies the use of `subst_and_normalize_erasing_regions` on
parts of the MIR bodies returned from `instance_mir`, so that
`InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a
type) do not perform substitutions. This avoids double substitutions and
enables polymorphic `InstanceDef`s.

Signed-off-by: David Wood <[email protected]>
This commit fixes an issue where if `eprintln!` is used in a TLS
destructor it can accidentally cause the process to abort. TLS
destructors are executed after `main` returns on the main thread, and at
this point we've also deinitialized global `Lazy` values like those
which store the `Stderr` and `Stdout` internals. This means that despite
handling TLS not being accessible in `eprintln!`, we will fail due to
not being able to call `stderr()`. This means that we'll double-panic
quickly because panicking also attempt to write to stderr.

The fix here is to reimplement the global stderr handle to avoid the
need for destruction. This avoids the need for `Lazy` as well as the
hidden panic inside of the `stderr` function.

Overall this should improve the robustness of printing errors and/or
panics in weird situations, since the `stderr` accessor should be
infallible in more situations.
…lfJung

Compute the correct layout for variants of uninhabited enums

r? @eddyb
cc @RalfJung

fixes rust-lang#69191
cc rust-lang#69763
Avoid query type in generics

There are at the moment roughly 170 queries in librustc.
The way ty::query is structured, a lot of code is duplicated for each query.
I suspect this to be responsible for a part of librustc'c compile time.

This PR reduces the amount of code generic on the query,
replacing it by code generic on the key-value types.

This is split out of rust-lang#69808,
and should not contain the perf regression.

cc rust-lang#65031
codegen/mir: support polymorphic `InstanceDef`s

cc rust-lang#69925

This PR modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s.

r? @eddyb
cc @nikomatsakis
librustc_codegen_llvm: Replace deprecated API usage
…fackler

Fix abort-on-eprintln during process shutdown

This commit fixes an issue where if `eprintln!` is used in a TLS
destructor it can accidentally cause the process to abort. TLS
destructors are executed after `main` returns on the main thread, and at
this point we've also deinitialized global `Lazy` values like those
which store the `Stderr` and `Stdout` internals. This means that despite
handling TLS not being accessible in `eprintln!`, we will fail due to
not being able to call `stderr()`. This means that we'll double-panic
quickly because panicking also attempt to write to stderr.

The fix here is to reimplement the global stderr handle to avoid the
need for destruction. This avoids the need for `Lazy` as well as the
hidden panic inside of the `stderr` function.

Overall this should improve the robustness of printing errors and/or
panics in weird situations, since the `stderr` accessor should be
infallible in more situations.
@Centril
Copy link
Contributor Author

Centril commented Mar 19, 2020

@bors r+ p=4 rollup=never treeclosed-

@bors
Copy link
Contributor

bors commented Mar 19, 2020

📌 Commit cb8af5e has been approved by Centril

@bors
Copy link
Contributor

bors commented Mar 19, 2020

🌲 The tree is currently closed for pull requests below priority 5, 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 Mar 19, 2020
@Centril Centril added the rollup A PR which is a rollup label Mar 19, 2020
@bors
Copy link
Contributor

bors commented Mar 19, 2020

⌛ Testing commit cb8af5e with merge 1b4fa5eba2474e49fce729b34dc64f0ec460eff0...

@bors
Copy link
Contributor

bors commented Mar 19, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 19, 2020
@Centril Centril deleted the rollup-2zimxr5 branch March 23, 2020 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants