-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
LazyLock not working as expected with deref #140340
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I'm not sure if this is a bug inside uuid or LazyLock, but I believe LazyLock should prevent any changes without the lock being acquired.
I tried this code:
I expected to see this happen:
Two similar UUID's
Instead, this happened:
[2025-04-26T15:38:56Z INFO splittable_be::templates] 3b9bd2f5-c2e1-433b-962e-1f662acdf5b1 c6258c4c-5bec-4ad5-a5f9-0818ec13537c
Meta
rustc --version --verbose: