|
| 1 | +error[E0658]: the `must_not_suspend` lint is unstable |
| 2 | + --> $DIR/gated.rs:2:1 |
| 3 | + | |
| 4 | +LL | #![deny(must_not_suspend)] |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information |
| 8 | + = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable |
| 9 | + |
| 10 | +error[E0658]: the `must_not_suspend` lint is unstable |
| 11 | + --> $DIR/gated.rs:2:1 |
| 12 | + | |
| 13 | +LL | #![deny(must_not_suspend)] |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + | |
| 16 | + = note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information |
| 17 | + = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable |
| 18 | + |
| 19 | +error[E0658]: the `must_not_suspend` lint is unstable |
| 20 | + --> $DIR/gated.rs:2:1 |
| 21 | + | |
| 22 | +LL | #![deny(must_not_suspend)] |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + | |
| 25 | + = note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information |
| 26 | + = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable |
| 27 | + |
| 28 | +error: `MutexGuard` held across a suspend point, but should not be |
| 29 | + --> $DIR/gated.rs:9:9 |
| 30 | + | |
| 31 | +LL | let _guard = m.lock().unwrap(); |
| 32 | + | ^^^^^^ |
| 33 | +LL | other().await; |
| 34 | + | ------------- the value is held across this suspend point |
| 35 | + | |
| 36 | +note: the lint level is defined here |
| 37 | + --> $DIR/gated.rs:2:9 |
| 38 | + | |
| 39 | +LL | #![deny(must_not_suspend)] |
| 40 | + | ^^^^^^^^^^^^^^^^ |
| 41 | +note: holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Futures to not implement `Send` |
| 42 | + --> $DIR/gated.rs:9:9 |
| 43 | + | |
| 44 | +LL | let _guard = m.lock().unwrap(); |
| 45 | + | ^^^^^^ |
| 46 | +help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point |
| 47 | + --> $DIR/gated.rs:9:9 |
| 48 | + | |
| 49 | +LL | let _guard = m.lock().unwrap(); |
| 50 | + | ^^^^^^ |
| 51 | + |
| 52 | +error: aborting due to 4 previous errors |
| 53 | + |
| 54 | +For more information about this error, try `rustc --explain E0658`. |
0 commit comments