-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Replace once_cell
crate from librustc_datastructures
with an (unstable) impl from std
#75700
Comments
once_cell
crate from ibrustc_datastructures
with an (usntable) impl from stdonce_cell
crate from ibrustc_datastructures
with an (unstable) impl from std
@bors claim |
once_cell
crate from ibrustc_datastructures
with an (unstable) impl from stdonce_cell
crate from librustc_datastructures
with an (unstable) impl from std
#75648 is done! Though, I am not unsure if we maybe should wait until it tickles down to beta? Not sure how bootstraping works with libstd, I guess, we can just try and see if the build fails. |
The compiler always builds with the in-tree standard library, so cfg(bootstrap) should never be necessary (beyond lints, and other compiler-implemented rather than library-implemented) details. |
ping @marmeladema, this is ready to be implemented. |
I'll start soon! Sorry I got a bit overwhelmed with work. If in the next couple of days I haven't replied feel free to re-assign. |
On it! |
@matklad once this is merged, should other sub-crates that depend on |
We definitely should actively remove once_cell crate from all rustc’s crates, because having two difference sources of the same data structure feels bad. Replacing lazy_static with std::lazy would also be good! |
I'll try to take of it once this issue is fixed 👍 |
After #75648 is merged, usage of
once_cell
in this module:https://github.com/rust-lang/rust/blob/5b04bbfcbb79ed7325ea2b580458a80d95da6bbb/src/librustc_data_structures/sync.rs
should be replaced by
std::[OnceCell|SyncOnceCell]
. The dependency from corresponding Cargo.toml can be removed afterwards.It might make sense to request a perf run, as crates.io version uses parking_lot, while the standard one uses std mutex, but I expect the difference to not matter -- fast path is equivalent for both.
The text was updated successfully, but these errors were encountered: