-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Make Debug representations of [Lazy, Once]*[Cell, Lock] consistent with Mutex and RwLock
#109318
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
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
cbfd689 to
3447fe5
Compare
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
☔ The latest upstream changes (presumably #109483) made this pull request unmergeable. Please resolve the merge conflicts. |
…istent with `Mutex` and `RwLock` `Mutex` prints `<locked>` as a field value when its inner value cannot be accessed, but the lazy types print a fixed string like "`OnceCell(Uninit)`". This could cause confusion if the inner type is a unit type named `Uninit` and does not respect the pretty-printing flag. With this change, the format message is now "`OnceCell(<uninit>)`", consistent with `Mutex`.
3447fe5 to
b7e68df
Compare
|
r? libs-api Please FCP (or, if this is a trivial enough change, decide it doesn't need FCP). This is a simple change that makes the Debug formats more consistent but it is user-facing. |
|
For the record, I am in favor. |
dtolnay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
@bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#109318 (Make `Debug` representations of `[Lazy, Once]*[Cell, Lock]` consistent with `Mutex` and `RwLock`) - rust-lang#113701 (Re-export core::ffi::FromBytesUntilNulError in std::ffi) - rust-lang#113804 (Resolve correct archive version name in `opt-dist`) - rust-lang#114165 (Add missing rvalues to smir) - rust-lang#114182 (clean up after 113312) - rust-lang#114193 (Update lexer emoji diagnostics to Unicode 15.0) - rust-lang#114200 (Detect trait upcasting through struct tail unsizing in new solver select) r? `@ghost` `@rustbot` modify labels: rollup
Mutexprints<locked>as a field value when its inner value cannot be accessed, but the lazy types print a fixed string like "OnceCell(Uninit)". This could cause confusion if the inner type is a unit type namedUninitand does not respect the pretty-printing flag. With this change, the format message is now "OnceCell(<uninit>)", consistent withMutex.