Skip to content

Rollup of 6 pull requests - #96502

Closed
Dylan-DPC wants to merge 23 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-y4g4wff
Closed

Rollup of 6 pull requests#96502
Dylan-DPC wants to merge 23 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-y4g4wff

Conversation

@Dylan-DPC

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joboetand others added 23 commits April 25, 2022 15:19
Mutex and Condvar are being replaced by more efficient implementations, which need thread parking themselves (see rust-lang#93740). Therefore use the pthread synchronization primitives directly. Also, avoid allocating because the Parker struct is being placed in an Arc anyways.
…r=jackh726
Ensure that `'_` and GAT yields errors
Fixesrust-lang#95305
`@bors` r? `@jackh726`
…=manishearth
Add more diagnostic items
This just adds a handful diagnostic items I noticed were missing.
Would it be worth doing this for all of the remaining types? I'm willing to do it if it'd be helpful.
std: directly use pthread in UNIX parker implementation
`Mutex` and `Condvar` are being replaced by more efficient implementations, which need thread parking themselves (see rust-lang#93740). Therefore we should use the `pthread` synchronization primitives directly. Also, we can avoid allocating the mutex and condition variable because the `Parker` struct is being placed in an `Arc` anyways.
This basically is just a copy of the current `Mutex` and `Condvar` code, which will however be removed (again, see rust-lang#93740). An alternative implementation could be to use dedicated private `OsMutex` and `OsCondvar` types, but all the other platforms supported by std actually have their own thread parking primitives.
I used `Pin` to guarantee a stable address for the `Parker` struct, while the current implementation does not, rather using extra unsafe declaration. Since the thread struct is shared anyways, I assumed this would not add too much clutter while being clearer.
…davidtwco
Migrate ambiguous plus diagnostic to the new derive macro
r? ``@davidtwco`` ``@jyn514``
…-lifetime-suggestion, r=jackh726
Recover suggestions to introduce named lifetime under NLL
Fixesrust-lang#96157
r? `@jackh726`
Built on top of rust-lang#96385 so only the second commit is relevant
Fixed grammatical error in example comment
Added missing "we" in sentence.
@rustbotrustbot added 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. rollup A PR which is a rollup labels Apr 28, 2022
@Dylan-DPC

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Apr 28, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 439d24e has been approved by Dylan-DPC

@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 28, 2022
@bors

bors commented Apr 28, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 439d24e with merge 37abde90a3c9db188b070e7f3e38741bccbbb167...

@bors

bors commented Apr 28, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@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 28, 2022
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-x86_64-netbsd failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] object test:false 6.014
error: unused doc comment
--> library/std/src/sys/unix/thread_parker.rs:71:5
|
71 | /// Use the monotonic clock on other systems.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72 | #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "espidf")))]
73 | / let (now, dur) = {
74 | | use super::time::Timespec;
75 | |
76 | | (Timespec::now(libc::CLOCK_MONOTONIC).t, dur)
| |______- rustdoc does not generate documentation for statements
|
|
= note: `-D unused-doc-comments` implied by `-D warnings`
= help: use `//` for a plain comment
error[E0599]: no method named `checked_add_duration` found for struct `timespec` in the current scope
|
|
79 | let timeout = now.checked_add_duration(&dur).map(|t| t.t).unwrap_or(TIMESPEC_MAX);
| ^^^^^^^^^^^^^^^^^^^^ method not found in `timespec`
For more information about this error, try `rustc --explain E0599`.
[RUSTC-TIMING] std test:false 2.656
error: could not compile `std` due to 2 previous errors
Build completed unsuccessfully in 0:06:37

@m-ou-se

Copy link
Copy Markdown
Member

Caused by #96393

@m-ou-sem-ou-se closed this Apr 28, 2022
@Dylan-DPC
Dylan-DPC deleted the rollup-y4g4wff branch April 28, 2022 10:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library 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

@Dylan-DPC@bors@rust-log-analyzer@m-ou-se@rustbot@joboet@pvdrz@Serial-ATA@user-simon@marmeladema