Skip to content

Where can std::sync::LazyLock be used already? #1860

Closed Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for bringing this up. I kind of rushed this in yesterday and relied on auto-fixes as well to the point where I barely reviewed the result.

My expectation is that the MSRV check would catch issues, and also that clippy respects the rust-version field in the Cargo manifest. Probably that's the reason it only replaced the Lazy occurrences where it did, places that aren't bound by the MSRV (to my mind).

Maybe that's something to rethink though, as we have test-utilities on the one hand and the CLI on the other. Test-utilities are usually needed to run tests of crates with a lower MSRV, so using more recent features there would mean running tests needs a more recent compiler.
Using more…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NobodyXu
Comment options

@Byron
Comment options

Answer selected by EliahKagan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants