-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Move some things to std::sync::poison and reexport them in std::sync
#134692
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
This comment has been minimized.
This comment has been minimized.
| #![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 uses 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).
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.
Alright, the blank line section breaks are fine but could you remove the double blank lines since rustfmt doesn't do those anywhere? I.e. \n\n\n -> \n\n.
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
library/std/src/sync/mod.rs
Outdated
| // * 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`
…-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`
|
It seems like the With that the only remaining thing is to drop @rustbot author |
9007792 to
2ff5393
Compare
Yes, works fine now.
Done.
Done |
|
Thanks! @bors r+ |
Move some things to `std::sync::poison` and reexport them in `std::sync` Tracking issue: rust-lang#134646 r? `@tgross35` I've used `sync_poison_mod` feature flag instead, because `sync_poison` had already been used back in 1.2.
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
dd99d4c to
ee2ad4d
Compare
|
I was not able to run debuginfo tests locally (they failed, maybe due to llvm version mismatch or something else, no idea), so I tried blessing them blindly and ended up adding an extra |
|
@bors r=tgross35 |
|
@bors rollup=iffy |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (ac00fe8): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -4.1%, secondary -3.8%)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.
CyclesResults (primary -3.0%)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.
Binary sizeResults (primary 0.0%, secondary 0.0%)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.
Bootstrap: 763.847s -> 763.746s (-0.01%) |
Tracking issue: #134646
r? @tgross35
I've used
sync_poison_modfeature flag instead, becausesync_poisonhad already been used back in 1.2.try-job: x86_64-msvc