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 7 pull requests #70943

Merged
merged 32 commits into from
Apr 9, 2020
Merged

Rollup of 7 pull requests #70943

merged 32 commits into from
Apr 9, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 9, 2020

Successful merges:

Failed merges:

r? @ghost

nikomatsakis and 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.

Fixes rust-lang#69307

r? @Zoxc
…ion, r=ecstatic-morse

Don't lint for self-recursion when the function can diverge

Fixes rust-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
Centril added 2 commits April 9, 2020 05:29
Support `#[track_caller]` on functions in `extern "Rust" { ... }`

Fixes rust-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
Contributor Author

Centril commented Apr 9, 2020

@bors r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Apr 9, 2020

📌 Commit 09052a6 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 Apr 9, 2020
@bors
Copy link
Contributor

bors commented Apr 9, 2020

⌛ Testing commit 09052a6 with merge bfa990f4b1aa5c6cb7fb55dd1aeae201473c5858...

@bors
Copy link
Contributor

bors commented Apr 9, 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 Apr 9, 2020
@Centril
Copy link
Contributor Author

Centril commented Apr 9, 2020

@bors retry spurious

@bors 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 Apr 9, 2020
@bors
Copy link
Contributor

bors commented Apr 9, 2020

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

@bors
Copy link
Contributor

bors commented Apr 9, 2020

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 9, 2020
@bors bors merged commit 93dc97a into rust-lang:master Apr 9, 2020
@Centril Centril deleted the rollup-eowm2h3 branch April 9, 2020 13:22
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. 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.

8 participants