-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
rust/library/std/src/sync/once.rs
Lines 390 to 393 in 3227e35
POISONED if !ignore_poisoning => { | |
// Panic to propagate the poison. | |
panic!("Once instance has previously been poisoned"); | |
} |
Trying to initialize a poisoned Once
does not track it's caller, yielding panic messages like
thread 'null_data' panicked at 'Once instance has previously been poisoned', library/std/src/sync/once.rs:392:21
Can we add #[track_caller]
here? I've seen previous PRs regarding other performance-critical methods get rejected due to the overhead (?) track_caller
has.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.