Skip to content

Replace once_cell crate from librustc_datastructures with an (unstable) impl from std #75700

Closed
@matklad

Description

@matklad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions