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

Merged
merged 23 commits into from
Jun 21, 2023
Merged

Rollup of 7 pull requests #112890

merged 23 commits into from
Jun 21, 2023

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ibraheemdev and others added 23 commits July 21, 2022 23:09
Co-authored-by: yvt <i@yvt.jp>
Co-authored-by: yvt <i@yvt.jp>
Document memory orderings of `thread::{park, unpark}`

Document `thread::park/unpark` as having acquire/release synchronization. Without that guarantee, even the example in the documentation can deadlock:

```rust
let flag = Arc::new(AtomicBool::new(false));

let t2 = thread::spawn(move || {
    while !flag.load(Ordering::Acquire) {
        thread::park();
    }
});

flag.store(true, Ordering::Release);
t2.thread().unpark();

// t1: flag.store(true)
// t1: thread.unpark()
// t2: flag.load() == false

// t2 now parks, is immediately unblocked but never
// acquires the flag, and thus spins forever
```

Multiple calls to `unpark` should also maintain a release sequence to make sure operations released by previous `unpark`s are not lost:

```rust
let a = Arc::new(AtomicBool::new(false));
let b = Arc::new(AtomicBool::new(false));

let t2 = thread::spawn(move || {
    while !a.load(Ordering::Acquire) || !b.load(Ordering::Acquire) {
        thread::park();
    }
});

thread::spawn(move || {
    a.store(true, Ordering::Release);
    t2.thread().unpark();
});

b.store(true, Ordering::Release);
t2.thread().unpark();

// t1: a.store(true)
// t1: t2.unpark()
// t3: b.store(true)
// t3: t2.unpark()

// t2 now parks, is immediately unblocked but never
// acquires the store of `a`, only the store of `b` which
// was released by the most recent unpark, and thus spins forever
```

This is of course a contrived example, but is reasonable to rely upon in real code.

Note that all implementations of park/unpark already comply with the rules, it's just undocumented.
…e-creation, r=notriddle

[rustdoc] partially fix invalid files creation

Part of rust-lang#111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly.

In case the item is inlined, it shouldn't (and neither should its children) get a file generated.

r? ```@notriddle```
…oli-obk

Add `lazy_type_alias` feature gate

Add the `type_alias_type` to be able to have the weak alias used without restrictions.

Part of rust-lang#112792.

cc `@compiler-errors`
r? `@oli-obk`
…san68

Fix copy-paste typo in `eprint(ln)` docs

Fixes rust-lang#112862
Make queries traceable again

This can't be tested without something along the lines of rust-lang#111924 unfortunately.

We could benchmark turning query tracing into an `info` level tracing statement, but let's get this fix landed first so we can actually debug properly again
…rtlarsan68

Revert 'Rename profile=user to profile=dist'

This reverts commit a45fc94 (rust-lang#112166)
Reverted as it didn't meet the requirements (rust-lang#112166 (comment)) and is causing issues (closes rust-lang#112846)

cc ``@AnakinSkywalkeer``
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 21, 2023
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Jun 21, 2023

📌 Commit a687a96 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Jun 21, 2023
@bors
Copy link
Contributor

bors commented Jun 21, 2023

⌛ Testing commit a687a96 with merge 536635c...

@bors
Copy link
Contributor

bors commented Jun 21, 2023

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 536635c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 21, 2023
@bors bors merged commit 536635c into rust-lang:master Jun 21, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 21, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#112886 e4cc8f4df5acd5578ae68c8c320678795e58d2d4
#112885 f78839f598546e2b9e2b6d8b8b6e8ffc31759216
#112883 736909877816e9329894927f1d03012c5d7969c8
#112863 2f25f76075ec6b763627ce4471e317c4ecc627c0
#112853 a054ccd5a138717711ee37bdc14475e8c8a9277f
#112836 090b5a11d4d97babc94f15dc74861baeaa932791
#99587 a47eb6d26eea3aabf9c3939a7d8c686d15e06183

previous master: 38b44eb233

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@GuillaumeGomez GuillaumeGomez deleted the rollup-7e01q69 branch June 21, 2023 17:23
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (536635c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.7% [0.7%, 0.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 659.034s -> 660.125s (0.17%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants