fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB41 linesraw
1error: busy-waiting loop should at least have a spin loop hint
2  --> $DIR/missing_spin_loop.rs:10:37
3   |
4LL |     while b.load(Ordering::Acquire) {}
5   |                                     ^^ help: try: `{ std::hint::spin_loop() }`
6   |
7   = note: `-D clippy::missing-spin-loop` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::missing_spin_loop)]`
9
10error: busy-waiting loop should at least have a spin loop hint
11  --> $DIR/missing_spin_loop.rs:12:37
12   |
13LL |     while !b.load(Ordering::SeqCst) {}
14   |                                     ^^ help: try: `{ std::hint::spin_loop() }`
15
16error: busy-waiting loop should at least have a spin loop hint
17  --> $DIR/missing_spin_loop.rs:14:46
18   |
19LL |     while b.load(Ordering::Acquire) == false {}
20   |                                              ^^ help: try: `{ std::hint::spin_loop() }`
21
22error: busy-waiting loop should at least have a spin loop hint
23  --> $DIR/missing_spin_loop.rs:16:49
24   |
25LL |     while { true == b.load(Ordering::Acquire) } {}
26   |                                                 ^^ help: try: `{ std::hint::spin_loop() }`
27
28error: busy-waiting loop should at least have a spin loop hint
29  --> $DIR/missing_spin_loop.rs:18:93
30   |
31LL |     while b.compare_exchange(true, false, Ordering::Acquire, Ordering::Relaxed) != Ok(true) {}
32   |                                                                                             ^^ help: try: `{ std::hint::spin_loop() }`
33
34error: busy-waiting loop should at least have a spin loop hint
35  --> $DIR/missing_spin_loop.rs:20:94
36   |
37LL |     while Ok(false) != b.compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed) {}
38   |                                                                                              ^^ help: try: `{ std::hint::spin_loop() }`
39
40error: aborting due to 6 previous errors
41