-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Move some things to std::sync::poison
and reexport them in std::sync
#134692
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -167,6 +167,11 @@ | |||
|
|||
#![stable(feature = "rust1", since = "1.0.0")] | |||
|
|||
// No formatting: this file is just re-exports, and their order is worth preserving. | |||
#![cfg_attr(rustfmt, rustfmt::skip)] |
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.
Could this skip just get applied to specific blocks, like in https://github.com/rust-lang/rust/blob/addbd001ec56741829f20a3000892f8620dd0843/library/core/src/unicode/mod.rs? Applying to the whole file would probably make it a bit too easy for things to get messy.
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.
Then pretty much every block of use
s would have to be annotated, because otherwise rustfmt
will regroup them.
IMO this looks even noisier and less accurate with all the additional attributes and inability to leave two blank lines between the groups (rustfmt
removes double empty lines).
326d1e0
to
b75bd5b
Compare
These should probably be marked Edit: opened #134702 |
b75bd5b
to
a39b164
Compare
Done. This helped with the search, but not with the things like |
I am not sure what you mean, could you post a screenshot (edit: on the rustdoc issue, #134702)? Unfortunately we probably should wait on a Rustdoc fix then, this would be a lot of API to have misleading documentation. |
a39b164
to
7b45289
Compare
// * RwLock (nonpoison_rwlock) | ||
|
||
// FIXME(sync_nonpoison): conditionally select the default flavor based on edition(?). | ||
use self::poison as default_poison_flavor; |
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.
We are at least two years off from an edition where we would change these defaults, so I don't think this needs to be addressed at this point. Just reexporting from self::poison
should be fine, things might change between now and the next edition.
This comment has been minimized.
This comment has been minimized.
7b45289
to
9007792
Compare
#134702 got closed, but #134702 (comment) is still a problem. |
…-better, r=GuillaumeGomez rustdoc: use shorter paths as preferred canonical paths This is a solution to [the `std::sync::poison` linking problem](rust-lang#134692 (comment)), and, in general, makes intra-doc links shorter and clearer. > Done. This helped with the search, but not with the things like `MutexGuard`'s doc's reference to `Mutex::lock` being converted to the absolute (unstable) `std::sync::poison::Mutex` path. cc `@tgross35` r? `@GuillaumeGomez`
Rollup merge of rust-lang#134806 - notriddle:notriddle/parent-path-is-better, r=GuillaumeGomez rustdoc: use shorter paths as preferred canonical paths This is a solution to [the `std::sync::poison` linking problem](rust-lang#134692 (comment)), and, in general, makes intra-doc links shorter and clearer. > Done. This helped with the search, but not with the things like `MutexGuard`'s doc's reference to `Mutex::lock` being converted to the absolute (unstable) `std::sync::poison::Mutex` path. cc `@tgross35` r? `@GuillaumeGomez`
Tracking issue: #134646
r? @tgross35
I've used
sync_poison_mod
feature flag instead, becausesync_poison
had already been used back in 1.2.