]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/missing_spin_loop.stderr
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
[rust.git] / src / tools / clippy / tests / ui / missing_spin_loop.stderr
1 error: busy-waiting loop should at least have a spin loop hint
2   --> $DIR/missing_spin_loop.rs:11:37
3    |
4 LL |     while b.load(Ordering::Acquire) {}
5    |                                     ^^ help: try this: `{ std::hint::spin_loop() }`
6    |
7    = note: `-D clippy::missing-spin-loop` implied by `-D warnings`
8
9 error: busy-waiting loop should at least have a spin loop hint
10   --> $DIR/missing_spin_loop.rs:13:37
11    |
12 LL |     while !b.load(Ordering::SeqCst) {}
13    |                                     ^^ help: try this: `{ std::hint::spin_loop() }`
14
15 error: busy-waiting loop should at least have a spin loop hint
16   --> $DIR/missing_spin_loop.rs:15:46
17    |
18 LL |     while b.load(Ordering::Acquire) == false {}
19    |                                              ^^ help: try this: `{ std::hint::spin_loop() }`
20
21 error: busy-waiting loop should at least have a spin loop hint
22   --> $DIR/missing_spin_loop.rs:17:49
23    |
24 LL |     while { true == b.load(Ordering::Acquire) } {}
25    |                                                 ^^ help: try this: `{ std::hint::spin_loop() }`
26
27 error: busy-waiting loop should at least have a spin loop hint
28   --> $DIR/missing_spin_loop.rs:19:93
29    |
30 LL |     while b.compare_exchange(true, false, Ordering::Acquire, Ordering::Relaxed) != Ok(true) {}
31    |                                                                                             ^^ help: try this: `{ std::hint::spin_loop() }`
32
33 error: busy-waiting loop should at least have a spin loop hint
34   --> $DIR/missing_spin_loop.rs:21:94
35    |
36 LL |     while Ok(false) != b.compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed) {}
37    |                                                                                              ^^ help: try this: `{ std::hint::spin_loop() }`
38
39 error: aborting due to 6 previous errors
40