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

Closed
wants to merge 36 commits into from
Closed

Rollup of 15 pull requests #77191

wants to merge 36 commits into from

Conversation

jonas-schievink
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost

JulianKnodt and others added 30 commits September 4, 2020 19:07
This allows for futex or thread parking based implementations in the
future.
Co-authored-by: varkor <github@varkor.com>
Add regression test

This adds a regression test for #75777, effectively closing it since it is solved on nightly and beta.
…sfackler

Relax promises about condition variable.

For quite a while now, there have been plans to at some point use parking_lot or some other more efficient implementation of mutexes and condition variables. Right now, Mutex and CondVar both Box the 'real' mutex/condvar inside, to give it a stable address. This was done because implementations like pthread and Windows critical sections may not be moved. More efficient implementations based on futexes, WaitOnAddress, Windows SRW locks, parking_lot, etc. may be moved (while not borrowed), so wouldn't need boxing.

However, not boxing them (which would be great goal to achieve), breaks a promise std currently makes about CondVar. CondVar promises to panic when used with different mutexes, to ensure consistent behaviour on all platforms. To this check, a mutex is considered 'the same' if the address of the 'real mutex' in the Box is the same. This address doesn't change when moving a `std::mutex::Mutex` object, effectively giving it an identity that survives moves of the Mutex object. If we ever switch to a non-boxed version, they no longer carry such an identity, and this check can no longer be made.

Four options:
1. Always box mutexes.
2. Add a `MutexId` similar to `ThreadId`. Making mutexes bigger, and making it hard to ever have a `const fn new` for them.
3. Making the requirement of CondVar stricter: panic if the Mutex object itself moved.
4. Making the promise of CondVar weaker: don't promise to panic.

1, 2, and 3 seem like bad options. This PR updates the documentation for 4.
Unstably allow assume intrinsic in const contexts

Not sure much about this usage because there are concerns
about [blocking  optimization][1] and [slowing down LLVM][2] when using `assme` intrinsic
in inline functions.
But since Oli suggested in #76960 (comment),
here we are.

[1]: #54995 (comment)
[2]: #49572 (comment)
BtreeMap: refactoring around edges

Parts chipped off a more daring effort, that the btree benchmarks judge to be performance-neutral.

r? @Mark-Simulacrum
Fix dest prop miscompilation around references

Closes #77002
dead_code: look at trait impls even if they don't contain items

fixes #70225
Include libunwind in the rust-src component.

Some targets, such as musl, need the libunwind source to build the unwind crate (referenced [here](https://github.com/rust-lang/rust/blob/0da58007451a154da2480160429e1604a1f5f0ec/library/unwind/build.rs#L142)).

Fixes rust-lang/wg-cargo-std-aware#59
…st-fn, r=oli-obk

Make [].as_[mut_]ptr_range() (unstably) const.

Gated behind `const_ptr_offset`, as suggested by #65807 (comment)

This also marks `[].as_mut_ptr()` as const, because it's used by `as_mut_ptr_range`. I gated it behind the same feature, because I figured it's not worth adding a separate tracking issue for const `as_mut_ptr`.
clarify that `changelog-seen = 1` goes to the beginning of config.toml

Fixes #77105
Invalidate local LLVM cache less often

This avoids a download of LLVM after every rebase. The downside to this is that if we land some patch affecting LLVM built in CI that breaks this option, but that PR does not update the LLVM submodule, we'll likely not notice until the next update -- but this seems unlikely to happen in practice and I am not personally worried about it.

r? @alexcrichton
Install std for non-host targets

It seems reasonable that when configuring various targets you'd expect all of them to get std installed, even if you're not building compiler toolchains for each of those.

cc #76990

r? @alexcrichton
remove enum name from ImplSource variants

This is quite a lot cleaner in my opinion.
…r, r=jyn514

Removing erroneous semicolon in transmute documentation

There is a semicolon in the example code that causes the expected value to not be returned.
Allow multiple allow_internal_unstable attributes

Fixes #77088
Remove extra space from vec drawing
@jonas-schievink
Copy link
Contributor Author

@bors r+ rollup=never p=15

@rustbot modify labels: rollup

@bors
Copy link
Contributor

bors commented Sep 25, 2020

📌 Commit 4e2c52f has been approved by jonas-schievink

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

bors commented Sep 25, 2020

⌛ Testing commit 4e2c52f with merge be5ba0e4ab50b3e07f98cc1edf69e51804ca44d6...

@bors
Copy link
Contributor

bors commented Sep 25, 2020

💔 Test failed - checks-actions

@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 Sep 25, 2020
@jonas-schievink jonas-schievink deleted the rollup-ntebron branch September 25, 2020 17:33
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.