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 15 pull requests #76964

Merged
merged 36 commits into from
Sep 20, 2020
Merged

Rollup of 15 pull requests #76964

merged 36 commits into from
Sep 20, 2020

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

ssomers and others added 30 commits September 15, 2020 13:46
A significant amount of intrinsics do not actually need backend-specific
behaviors to be implemented, instead relying on methods already in
rustc_codegen_ssa. So, extract those methods out to rustc_codegen_ssa,
so that each backend doesn't need to reimplement the same code.
Previously, `x.py` would unconditionally run `x.py build` to get the
help message. After rust-lang#76165,
when checking the CI stage was moved into `Config`, that would cause an
assertion failure (but only only in CI!):

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', src/bootstrap/config.rs:619:49
```

This changes bootstrap to only generate a help message when it needs
to (when someone passes `--help`).
Use `SyncOnceCell` to only compile it once.
I believe this still adds some kind of locking mechanism?
The use of arith_offset was added in 803e9ae
before the stable wrapper of the intrinsic was available.

https://doc.rust-lang.org/stable/std/intrinsics/fn.arith_offset.html
The latter is on the path to stabilization.
…ulacrum

Test and fix Send and Sync traits of BTreeMap artefacts

Fixes rust-lang#76686.

I'm not quite sure what all this implies. E.g. comparing with the definitions for `NodeRef` in node.rs,  maybe an extra bound `T: 'a` is useful for something. The test compiles on stable/beta (apart from `drain_filter`) so I bet `Sync` is equally desirable.

r? @Mark-Simulacrum
Extract some intrinsics out of rustc_codegen_llvm

A significant amount of intrinsics do not actually need backend-specific behaviors to be implemented, instead relying on methods already in rustc_codegen_ssa. So, extract those methods out to rustc_codegen_ssa, so that each backend doesn't need to reimplement the same code.

Almost everything should be a pretty direct translation. A notable not-direct-translation is `add_with_overflow` and friends being changed to `bx.checked_binop`, but it's pretty simple.

I could have been a lot more aggressive here and pulled out way more methods, and add a few new methods in the rustc_codegen_ssa "API". However, because this is my second rustc PR, I thought that moving those to a follow-up PR and doing more incremental changes here would be better (and I guess ask if this work is even desired in the first place). I'm hoping to eventually remove the mess of intrinsic handling in the backend entirely, which would be hecking fantastic ✨
Don't generate bootstrap usage unless it's needed

Previously, `x.py` would unconditionally run `x.py build` to get the
help message. After rust-lang#76165,
when checking the CI stage was moved into `Config`, that would cause an
assertion failure (but only only in CI!):

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', src/bootstrap/config.rs:619:49
```

This changes bootstrap to only generate a help message when it needs
to (when someone passes `--help`).

r? @Mark-Simulacrum
This should fix the CI failures in rust-lang#76797 and rust-lang#75991.
simplfy condition in ItemLowerer::with_trait_impl_ref()
…me, r=ecstatic-morse

Don't compile regex at every function call.

Use `SyncOnceCell` to only compile it once.
I believe this still adds some kind of locking mechanism?

Related issue: rust-lang#76817
…ures, r=oli-obk,Mark-Simulacrum

Remove redundant nightly features

Removes a bunch of redundant/outdated nightly features. The first commit removes a `core_intrinsics` use for which a stable wrapper has been provided since. The second commit replaces the `const_generics` feature with `min_const_generics` which might get stabilized this year. The third commit is the result of a trial/error run of removing every single feature and then adding it back if compile failed. A bunch of unused features are the result that the third commit removes.
…lett

black_box: silence unused_mut warning when building with cfg(miri)
use `array_windows` instead of `windows` in the compiler

I do think these changes are beautiful, but do have to admit that using type inference for the window length
can easily be confusing. This seems like a general issue with const generics, where inferring constants adds an additional
complexity which users have to learn and keep in mind.
…=lcnr

use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip)
…d-future, r=jyn514

Move to intra doc links in core/src/future

Helps with rust-lang#75080.

@rustbot modify labels: T-doc A-intra-doc-links

r? @jyn514
Use intra docs links in core::{ascii, option, str, pattern, hash::map}

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc A-intra-doc-links

r? @jyn514
…ake, r=jyn514

Use intra-doc links in library/core/src/task/wake.rs

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
@RalfJung
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=15

@bors
Copy link
Contributor

bors commented Sep 20, 2020

📌 Commit e5be14c has been approved by RalfJung

@rustbot rustbot added the rollup A PR which is a rollup label Sep 20, 2020
@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 Sep 20, 2020
@bors
Copy link
Contributor

bors commented Sep 20, 2020

⌛ Testing commit e5be14c with merge 41507ed...

@bors
Copy link
Contributor

bors commented Sep 20, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: RalfJung
Pushing 41507ed to master...

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.