We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fcbb9b commit 9ee762aCopy full SHA for 9ee762a
std/src/sync/once.rs
@@ -256,6 +256,7 @@ impl Once {
256
///
257
/// [poison]: struct.Mutex.html#poisoning
258
#[stable(feature = "rust1", since = "1.0.0")]
259
+ #[track_caller]
260
pub fn call_once<F>(&self, f: F)
261
where
262
F: FnOnce(),
@@ -390,6 +391,7 @@ impl Once {
390
391
// currently no way to take an `FnOnce` and call it via virtual dispatch
392
// without some allocation overhead.
393
#[cold]
394
395
fn call_inner(&self, ignore_poisoning: bool, init: &mut dyn FnMut(&OnceState)) {
396
let mut state_and_queue = self.state_and_queue.load(Ordering::Acquire);
397
loop {
0 commit comments