Skip to content

Rollup of 7 pull requests - #70943

Merged
bors merged 32 commits into
rust-lang:masterfrom
Centril:rollup-eowm2h3
Apr 9, 2020
Merged

Rollup of 7 pull requests#70943
bors merged 32 commits into
rust-lang:masterfrom
Centril:rollup-eowm2h3

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

nikomatsakisand others added 30 commits March 24, 2020 15:25
This flag is used to make the execution order around `+=` operators
pessimistic. Failure to save/restore the flag was causing independent
async blocks to effect one another, leading to strange ICEs and failed
assumptions.
The iterators are now "fused" with `Option` so we don't need separate
state to track which part is already exhausted, and we may also get
niche layout for `None`. We don't use the real `Fuse` adapter because
its specialization for `FusedIterator` unconditionally descends into the
iterator, and that could be expensive to keep revisiting stuff like
nested chains. It also hurts compiler performance to add more iterator
layers to `Chain`.
Use unrolled loop for searching NULL in [u16] on Windows
save/restore `pessimistic_yield` when entering bodies
This flag is used to make the execution order around `+=` operators
pessimistic. Failure to save/restore the flag was causing independent
async blocks to effect one another, leading to strange ICEs and failed
assumptions.
Fixesrust-lang#69307
r? @Zoxc
…ion, r=ecstatic-morse
Don't lint for self-recursion when the function can diverge
Fixesrust-lang#54444
…ti865
rustc_codegen_ssa: Refactor construction of linker arguments
And add comments.
This PR doesn't reorder any linker arguments and therefore shouldn't contain any observable changes.
The next goal here is to
- Factor out order-independent linker arguments in the compiler code and in target specifications and pass them together. Such arguments generally apply to the whole linking session or the produced linking result rather to individual object files or libraries.
- Figure out where exactly among the remaining order-dependent arguments we should place customization points like `-C link-args` and `-Z pre-link-args`.
- Possibly provide command line opt-outs for options that are currently passed unconditionally (like CRT objects or arguments defined by the target spec).
- Document and stabilize the customization points that are not yet stable (rust-lang#70505).
Implement Chain with Option fuses
The iterators are now "fused" with `Option` so we don't need separate state to track which part is already exhausted, and we may also get niche layout for `None`. We don't use the real `Fuse` adapter because its specialization for `FusedIterator` unconditionally descends into the iterator, and that could be expensive to keep revisiting stuff like nested chains. It also hurts compiler performance to add more iterator layers to `Chain`.
This change was inspired by the [proposal](https://internals.rust-lang.org/t/proposal-implement-iter-chain-using-fuse/12006) on the internals forum. This is an alternate to rust-lang#70332, directly employing some of the same `Fuse` optimizations as rust-lang#70366 and rust-lang#70750.
r? @scottmcm
Support `#[track_caller]` on functions in `extern "Rust" { ... }`
Fixesrust-lang#70830 which is the follow-up to @eddyb's suggestion in rust-lang#69251 (comment) to allow `#[track_caller]` on `fn`s in FFI imports, that is, on functions in `extern "Rust" { ... }` blocks.
This requires that the other side, the FFI export, also have the `#[track_caller]` attribute. Otherwise, undefined behavior is triggered and the blame lies, as usual, with the `unsafe { ... }` block which called the FFI imported function.
After this PR, all forms of `fn` items with the right ABI (`"Rust"`) support `#[track_caller]`.
As a drive-by, the PR also hardens the check rejecting `#[naked] #[track_caller]` such that methods and other forms of `fn` items are also considered.
r? @eddyb
cc @rust-lang/lang
…vidtwco
rustc_session: forbid lints override regardless of position
Addresses the regression reported in rust-lang#70819 for command line arguments, but does not address the source code flag regression.
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=7 rollup=never

@bors

bors commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 09052a6 has been approved by Centril

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 9, 2020
@bors

bors commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 09052a6 with merge bfa990f4b1aa5c6cb7fb55dd1aeae201473c5858...

@bors

bors commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors 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 Apr 9, 2020
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors retry spurious

@borsbors 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 Apr 9, 2020
@bors

bors commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 09052a6 with merge 93dc97a...

@bors

bors commented Apr 9, 2020

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 9, 2020
@bors
bors merged commit 93dc97a into rust-lang:masterApr 9, 2020
@Centril
Centril deleted the rollup-eowm2h3 branch April 9, 2020 13:22
This was referenced Apr 9, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

8 participants

@Centril@bors@nikomatsakis@tesuji@jonas-schievink@petrochenkov@cuviper@tobithiel