Skip to content

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joboet and 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

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

Fixes rust-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.
@rustbot rustbot 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
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 28, 2022

📌 Commit 439d24e has been approved by Dylan-DPC

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

bors commented Apr 28, 2022

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

@bors
Copy link
Collaborator

bors commented Apr 28, 2022

💔 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 Apr 28, 2022
@rust-log-analyzer
Copy link
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
Member

m-ou-se commented Apr 28, 2022

Caused by #96393

@m-ou-se m-ou-se closed this Apr 28, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-y4g4wff branch April 28, 2022 10:51
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants