From 4cc3297dc403e9d4d2106b26418efe35d4bb1af2 Mon Sep 17 00:00:00 2001 From: Gus Wynn Date: Mon, 27 Sep 2021 08:49:36 -0700 Subject: [PATCH] #[feature] not required for lint result --- src/test/ui/lint/must_not_suspend/mutex.rs | 1 - src/test/ui/lint/must_not_suspend/mutex.stderr | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/ui/lint/must_not_suspend/mutex.rs b/src/test/ui/lint/must_not_suspend/mutex.rs index 7bb895e7d36..596249b2e4e 100644 --- a/src/test/ui/lint/must_not_suspend/mutex.rs +++ b/src/test/ui/lint/must_not_suspend/mutex.rs @@ -1,5 +1,4 @@ // edition:2018 -#![feature(must_not_suspend)] #![deny(must_not_suspend)] async fn other() {} diff --git a/src/test/ui/lint/must_not_suspend/mutex.stderr b/src/test/ui/lint/must_not_suspend/mutex.stderr index 69638fc2010..47a84fdbc57 100644 --- a/src/test/ui/lint/must_not_suspend/mutex.stderr +++ b/src/test/ui/lint/must_not_suspend/mutex.stderr @@ -1,5 +1,5 @@ error: `MutexGuard` held across a suspend point, but should not be - --> $DIR/mutex.rs:8:9 + --> $DIR/mutex.rs:7:9 | LL | let _guard = m.lock().unwrap(); | ^^^^^^ @@ -7,17 +7,17 @@ LL | other().await; | ------------- the value is held across this suspend point | note: the lint level is defined here - --> $DIR/mutex.rs:3:9 + --> $DIR/mutex.rs:2:9 | LL | #![deny(must_not_suspend)] | ^^^^^^^^^^^^^^^^ note: Holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Future's to not implement `Send` - --> $DIR/mutex.rs:8:9 + --> $DIR/mutex.rs:7:9 | LL | let _guard = m.lock().unwrap(); | ^^^^^^ help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/mutex.rs:8:9 + --> $DIR/mutex.rs:7:9 | LL | let _guard = m.lock().unwrap(); | ^^^^^^