Skip to content

Commit 4cc3297

Browse files
committed
#[feature] not required for lint result
1 parent 0f9c349 commit 4cc3297

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/test/ui/lint/must_not_suspend/mutex.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// edition:2018
2-
#![feature(must_not_suspend)]
32
#![deny(must_not_suspend)]
43

54
async fn other() {}

src/test/ui/lint/must_not_suspend/mutex.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
error: `MutexGuard` held across a suspend point, but should not be
2-
--> $DIR/mutex.rs:8:9
2+
--> $DIR/mutex.rs:7:9
33
|
44
LL | let _guard = m.lock().unwrap();
55
| ^^^^^^
66
LL | other().await;
77
| ------------- the value is held across this suspend point
88
|
99
note: the lint level is defined here
10-
--> $DIR/mutex.rs:3:9
10+
--> $DIR/mutex.rs:2:9
1111
|
1212
LL | #![deny(must_not_suspend)]
1313
| ^^^^^^^^^^^^^^^^
1414
note: Holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Future's to not implement `Send`
15-
--> $DIR/mutex.rs:8:9
15+
--> $DIR/mutex.rs:7:9
1616
|
1717
LL | let _guard = m.lock().unwrap();
1818
| ^^^^^^
1919
help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
20-
--> $DIR/mutex.rs:8:9
20+
--> $DIR/mutex.rs:7:9
2121
|
2222
LL | let _guard = m.lock().unwrap();
2323
| ^^^^^^

0 commit comments

Comments
 (0)