From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/lint/must_not_suspend/boxed.rs | 25 --------------- src/test/ui/lint/must_not_suspend/boxed.stderr | 26 --------------- src/test/ui/lint/must_not_suspend/dedup.rs | 20 ------------ src/test/ui/lint/must_not_suspend/dedup.stderr | 19 ----------- .../feature-gate-must_not_suspend.rs | 9 ------ .../feature-gate-must_not_suspend.stderr | 12 ------- src/test/ui/lint/must_not_suspend/gated.rs | 17 ---------- src/test/ui/lint/must_not_suspend/gated.stderr | 33 ------------------- src/test/ui/lint/must_not_suspend/generic.rs | 20 ------------ src/test/ui/lint/must_not_suspend/handled.rs | 28 ---------------- src/test/ui/lint/must_not_suspend/issue-89562.rs | 19 ----------- src/test/ui/lint/must_not_suspend/mutex.rs | 13 -------- src/test/ui/lint/must_not_suspend/mutex.stderr | 26 --------------- src/test/ui/lint/must_not_suspend/other_items.rs | 8 ----- .../ui/lint/must_not_suspend/other_items.stderr | 10 ------ .../ui/lint/must_not_suspend/ref-drop-tracking.rs | 30 ------------------ .../lint/must_not_suspend/ref-drop-tracking.stderr | 27 ---------------- .../lint/must_not_suspend/ref.drop_tracking.stderr | 27 ---------------- .../must_not_suspend/ref.no_drop_tracking.stderr | 27 ---------------- src/test/ui/lint/must_not_suspend/ref.rs | 29 ----------------- src/test/ui/lint/must_not_suspend/return.rs | 9 ------ src/test/ui/lint/must_not_suspend/return.stderr | 12 ------- src/test/ui/lint/must_not_suspend/trait.rs | 28 ---------------- src/test/ui/lint/must_not_suspend/trait.stderr | 37 ---------------------- src/test/ui/lint/must_not_suspend/unit.rs | 25 --------------- src/test/ui/lint/must_not_suspend/unit.stderr | 26 --------------- src/test/ui/lint/must_not_suspend/warn.rs | 26 --------------- src/test/ui/lint/must_not_suspend/warn.stderr | 26 --------------- 28 files changed, 614 deletions(-) delete mode 100644 src/test/ui/lint/must_not_suspend/boxed.rs delete mode 100644 src/test/ui/lint/must_not_suspend/boxed.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/dedup.rs delete mode 100644 src/test/ui/lint/must_not_suspend/dedup.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs delete mode 100644 src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/gated.rs delete mode 100644 src/test/ui/lint/must_not_suspend/gated.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/generic.rs delete mode 100644 src/test/ui/lint/must_not_suspend/handled.rs delete mode 100644 src/test/ui/lint/must_not_suspend/issue-89562.rs delete mode 100644 src/test/ui/lint/must_not_suspend/mutex.rs delete mode 100644 src/test/ui/lint/must_not_suspend/mutex.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/other_items.rs delete mode 100644 src/test/ui/lint/must_not_suspend/other_items.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs delete mode 100644 src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/ref.drop_tracking.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/ref.rs delete mode 100644 src/test/ui/lint/must_not_suspend/return.rs delete mode 100644 src/test/ui/lint/must_not_suspend/return.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/trait.rs delete mode 100644 src/test/ui/lint/must_not_suspend/trait.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/unit.rs delete mode 100644 src/test/ui/lint/must_not_suspend/unit.stderr delete mode 100644 src/test/ui/lint/must_not_suspend/warn.rs delete mode 100644 src/test/ui/lint/must_not_suspend/warn.stderr (limited to 'src/test/ui/lint/must_not_suspend') diff --git a/src/test/ui/lint/must_not_suspend/boxed.rs b/src/test/ui/lint/must_not_suspend/boxed.rs deleted file mode 100644 index 1f823fc55..000000000 --- a/src/test/ui/lint/must_not_suspend/boxed.rs +++ /dev/null @@ -1,25 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - i: i64 -} - - -fn bar() -> Box { - Box::new(Umm { - i: 1 - }) -} - -async fn other() {} - -pub async fn uhoh() { - let _guard = bar(); //~ ERROR boxed `Umm` held across - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/boxed.stderr b/src/test/ui/lint/must_not_suspend/boxed.stderr deleted file mode 100644 index 9efc7b069..000000000 --- a/src/test/ui/lint/must_not_suspend/boxed.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: boxed `Umm` held across a suspend point, but should not be - --> $DIR/boxed.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/boxed.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/boxed.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -note: the lint level is defined here - --> $DIR/boxed.rs:3:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/dedup.rs b/src/test/ui/lint/must_not_suspend/dedup.rs deleted file mode 100644 index 81a08579b..000000000 --- a/src/test/ui/lint/must_not_suspend/dedup.rs +++ /dev/null @@ -1,20 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend] -struct No {} - -async fn shushspend() {} - -async fn wheeee(t: T) { - shushspend().await; - drop(t); -} - -async fn yes() { - wheeee(&No {}).await; //~ ERROR `No` held across -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/dedup.stderr b/src/test/ui/lint/must_not_suspend/dedup.stderr deleted file mode 100644 index f8978ba57..000000000 --- a/src/test/ui/lint/must_not_suspend/dedup.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: `No` held across a suspend point, but should not be - --> $DIR/dedup.rs:16:13 - | -LL | wheeee(&No {}).await; - | ^^^^^ ------ the value is held across this suspend point - | -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/dedup.rs:16:13 - | -LL | wheeee(&No {}).await; - | ^^^^^ -note: the lint level is defined here - --> $DIR/dedup.rs:3:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs b/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs deleted file mode 100644 index 1554408c1..000000000 --- a/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs +++ /dev/null @@ -1,9 +0,0 @@ -// edition:2018 - -#[must_not_suspend = "You gotta use Umm's, ya know?"] //~ ERROR the `#[must_not_suspend]` -struct Umm { - _i: i64 -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr b/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr deleted file mode 100644 index ab20a8be8..000000000 --- a/src/test/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: the `#[must_not_suspend]` attribute is an experimental feature - --> $DIR/feature-gate-must_not_suspend.rs:3:1 - | -LL | #[must_not_suspend = "You gotta use Umm's, ya know?"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #83310 for more information - = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/lint/must_not_suspend/gated.rs b/src/test/ui/lint/must_not_suspend/gated.rs deleted file mode 100644 index b73a76555..000000000 --- a/src/test/ui/lint/must_not_suspend/gated.rs +++ /dev/null @@ -1,17 +0,0 @@ -// check-pass - -// edition:2018 -#![deny(must_not_suspend)] -//~^ WARNING unknown lint: `must_not_suspend` -//~| WARNING unknown lint: `must_not_suspend` -//~| WARNING unknown lint: `must_not_suspend` - -async fn other() {} - -pub async fn uhoh(m: std::sync::Mutex<()>) { - let _guard = m.lock().unwrap(); - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/gated.stderr b/src/test/ui/lint/must_not_suspend/gated.stderr deleted file mode 100644 index 64de1ebea..000000000 --- a/src/test/ui/lint/must_not_suspend/gated.stderr +++ /dev/null @@ -1,33 +0,0 @@ -warning: unknown lint: `must_not_suspend` - --> $DIR/gated.rs:4:1 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `must_not_suspend` lint is unstable - = note: see issue #83310 for more information - = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable - = note: `#[warn(unknown_lints)]` on by default - -warning: unknown lint: `must_not_suspend` - --> $DIR/gated.rs:4:1 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `must_not_suspend` lint is unstable - = note: see issue #83310 for more information - = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable - -warning: unknown lint: `must_not_suspend` - --> $DIR/gated.rs:4:1 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the `must_not_suspend` lint is unstable - = note: see issue #83310 for more information - = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable - -warning: 3 warnings emitted - diff --git a/src/test/ui/lint/must_not_suspend/generic.rs b/src/test/ui/lint/must_not_suspend/generic.rs deleted file mode 100644 index b3effa020..000000000 --- a/src/test/ui/lint/must_not_suspend/generic.rs +++ /dev/null @@ -1,20 +0,0 @@ -// edition:2018 -// run-pass -// -// this test shows a case where the lint doesn't fire in generic code -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend] -struct No {} - -async fn shushspend() {} - -async fn wheeee(t: T) { - shushspend().await; - drop(t); -} - -fn main() { - let _fut = wheeee(No {}); -} diff --git a/src/test/ui/lint/must_not_suspend/handled.rs b/src/test/ui/lint/must_not_suspend/handled.rs deleted file mode 100644 index 8714be644..000000000 --- a/src/test/ui/lint/must_not_suspend/handled.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -// run-pass -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - _i: i64 -} - - -fn bar() -> Umm { - Umm { - _i: 1 - } -} - -async fn other() {} - -pub async fn uhoh() { - { - let _guard = bar(); - } - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/issue-89562.rs b/src/test/ui/lint/must_not_suspend/issue-89562.rs deleted file mode 100644 index acdb36fcd..000000000 --- a/src/test/ui/lint/must_not_suspend/issue-89562.rs +++ /dev/null @@ -1,19 +0,0 @@ -// edition:2018 -// run-pass - -use std::sync::Mutex; - -// Copied from the issue. Allow-by-default for now, so run-pass -pub async fn foo() { - let foo = Mutex::new(1); - let lock = foo.lock().unwrap(); - - // Prevent mutex lock being held across `.await` point. - drop(lock); - - bar().await; -} - -async fn bar() {} - -fn main() {} diff --git a/src/test/ui/lint/must_not_suspend/mutex.rs b/src/test/ui/lint/must_not_suspend/mutex.rs deleted file mode 100644 index 7bb895e7d..000000000 --- a/src/test/ui/lint/must_not_suspend/mutex.rs +++ /dev/null @@ -1,13 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -async fn other() {} - -pub async fn uhoh(m: std::sync::Mutex<()>) { - let _guard = m.lock().unwrap(); //~ ERROR `MutexGuard` held across - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/mutex.stderr b/src/test/ui/lint/must_not_suspend/mutex.stderr deleted file mode 100644 index c251cb845..000000000 --- a/src/test/ui/lint/must_not_suspend/mutex.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: `MutexGuard` held across a suspend point, but should not be - --> $DIR/mutex.rs:8:9 - | -LL | let _guard = m.lock().unwrap(); - | ^^^^^^ -LL | other().await; - | ------ the value is held across this suspend point - | -note: holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Futures to not implement `Send` - --> $DIR/mutex.rs:8: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 - | -LL | let _guard = m.lock().unwrap(); - | ^^^^^^ -note: the lint level is defined here - --> $DIR/mutex.rs:3:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/other_items.rs b/src/test/ui/lint/must_not_suspend/other_items.rs deleted file mode 100644 index 5aa1abb14..000000000 --- a/src/test/ui/lint/must_not_suspend/other_items.rs +++ /dev/null @@ -1,8 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend] //~ ERROR attribute should be -mod inner {} - -fn main() {} diff --git a/src/test/ui/lint/must_not_suspend/other_items.stderr b/src/test/ui/lint/must_not_suspend/other_items.stderr deleted file mode 100644 index 41c889692..000000000 --- a/src/test/ui/lint/must_not_suspend/other_items.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: `must_not_suspend` attribute should be applied to a struct, enum, or trait - --> $DIR/other_items.rs:5:1 - | -LL | #[must_not_suspend] - | ^^^^^^^^^^^^^^^^^^^ -LL | mod inner {} - | ------------ is not a struct, enum, or trait - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs b/src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs deleted file mode 100644 index 1bc4a3812..000000000 --- a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs +++ /dev/null @@ -1,30 +0,0 @@ -// edition:2018 -// compile-flags: -Zdrop-tracking -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - i: i64 -} - -struct Bar { - u: Umm, -} - -async fn other() {} - -impl Bar { - async fn uhoh(&mut self) { - let guard = &mut self.u; //~ ERROR `Umm` held across - - other().await; - - *guard = Umm { - i: 2 - } - } -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr b/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr deleted file mode 100644 index 180e187c1..000000000 --- a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: reference to `Umm` held across a suspend point, but should not be - --> $DIR/ref-drop-tracking.rs:19:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -LL | -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/ref-drop-tracking.rs:19:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/ref-drop-tracking.rs:19:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -note: the lint level is defined here - --> $DIR/ref-drop-tracking.rs:4:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/ref.drop_tracking.stderr b/src/test/ui/lint/must_not_suspend/ref.drop_tracking.stderr deleted file mode 100644 index abf76711b..000000000 --- a/src/test/ui/lint/must_not_suspend/ref.drop_tracking.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: reference to `Umm` held across a suspend point, but should not be - --> $DIR/ref.rs:21:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -LL | -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/ref.rs:21:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/ref.rs:21:13 - | -LL | let guard = &mut self.u; - | ^^^^^ -note: the lint level is defined here - --> $DIR/ref.rs:6:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr b/src/test/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr deleted file mode 100644 index 41ac09ea7..000000000 --- a/src/test/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: `Umm` held across a suspend point, but should not be - --> $DIR/ref.rs:21:26 - | -LL | let guard = &mut self.u; - | ^^^^^^ -LL | -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/ref.rs:21:26 - | -LL | let guard = &mut self.u; - | ^^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/ref.rs:21:26 - | -LL | let guard = &mut self.u; - | ^^^^^^ -note: the lint level is defined here - --> $DIR/ref.rs:6:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/ref.rs b/src/test/ui/lint/must_not_suspend/ref.rs deleted file mode 100644 index f6b23746f..000000000 --- a/src/test/ui/lint/must_not_suspend/ref.rs +++ /dev/null @@ -1,29 +0,0 @@ -// edition:2018 -// revisions: no_drop_tracking drop_tracking -// [drop_tracking] compile-flags: -Zdrop-tracking=yes -// [no_drop_tracking] compile-flags: -Zdrop-tracking=no -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - i: i64, -} - -struct Bar { - u: Umm, -} - -async fn other() {} - -impl Bar { - async fn uhoh(&mut self) { - let guard = &mut self.u; //~ ERROR `Umm` held across - - other().await; - - *guard = Umm { i: 2 } - } -} - -fn main() {} diff --git a/src/test/ui/lint/must_not_suspend/return.rs b/src/test/ui/lint/must_not_suspend/return.rs deleted file mode 100644 index 5b1fa5e27..000000000 --- a/src/test/ui/lint/must_not_suspend/return.rs +++ /dev/null @@ -1,9 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend] //~ ERROR attribute should be -fn foo() -> i32 { - 0 -} -fn main() {} diff --git a/src/test/ui/lint/must_not_suspend/return.stderr b/src/test/ui/lint/must_not_suspend/return.stderr deleted file mode 100644 index fdada85eb..000000000 --- a/src/test/ui/lint/must_not_suspend/return.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: `must_not_suspend` attribute should be applied to a struct, enum, or trait - --> $DIR/return.rs:5:1 - | -LL | #[must_not_suspend] - | ^^^^^^^^^^^^^^^^^^^ -LL | / fn foo() -> i32 { -LL | | 0 -LL | | } - | |_- is not a struct, enum, or trait - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/trait.rs b/src/test/ui/lint/must_not_suspend/trait.rs deleted file mode 100644 index 6c911cb4b..000000000 --- a/src/test/ui/lint/must_not_suspend/trait.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend] -trait Wow {} - -impl Wow for i32 {} - -fn r#impl() -> impl Wow { - 1 -} - -fn r#dyn() -> Box { - Box::new(1) -} - -async fn other() {} - -pub async fn uhoh() { - let _guard1 = r#impl(); //~ ERROR implementer of `Wow` held across - let _guard2 = r#dyn(); //~ ERROR boxed `Wow` trait object held across - - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/trait.stderr b/src/test/ui/lint/must_not_suspend/trait.stderr deleted file mode 100644 index d64d25aae..000000000 --- a/src/test/ui/lint/must_not_suspend/trait.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error: implementer of `Wow` held across a suspend point, but should not be - --> $DIR/trait.rs:21:9 - | -LL | let _guard1 = r#impl(); - | ^^^^^^^ -... -LL | other().await; - | ------ the value is held across this suspend point - | -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/trait.rs:21:9 - | -LL | let _guard1 = r#impl(); - | ^^^^^^^ -note: the lint level is defined here - --> $DIR/trait.rs:3:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: boxed `Wow` trait object held across a suspend point, but should not be - --> $DIR/trait.rs:22:9 - | -LL | let _guard2 = r#dyn(); - | ^^^^^^^ -LL | -LL | other().await; - | ------ the value is held across this suspend point - | -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/trait.rs:22:9 - | -LL | let _guard2 = r#dyn(); - | ^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/lint/must_not_suspend/unit.rs b/src/test/ui/lint/must_not_suspend/unit.rs deleted file mode 100644 index d3a19f704..000000000 --- a/src/test/ui/lint/must_not_suspend/unit.rs +++ /dev/null @@ -1,25 +0,0 @@ -// edition:2018 -#![feature(must_not_suspend)] -#![deny(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - i: i64 -} - - -fn bar() -> Umm { - Umm { - i: 1 - } -} - -async fn other() {} - -pub async fn uhoh() { - let _guard = bar(); //~ ERROR `Umm` held across - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/unit.stderr b/src/test/ui/lint/must_not_suspend/unit.stderr deleted file mode 100644 index c967dbac5..000000000 --- a/src/test/ui/lint/must_not_suspend/unit.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: `Umm` held across a suspend point, but should not be - --> $DIR/unit.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/unit.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/unit.rs:20:9 - | -LL | let _guard = bar(); - | ^^^^^^ -note: the lint level is defined here - --> $DIR/unit.rs:3:9 - | -LL | #![deny(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/must_not_suspend/warn.rs b/src/test/ui/lint/must_not_suspend/warn.rs deleted file mode 100644 index 7fdea66a2..000000000 --- a/src/test/ui/lint/must_not_suspend/warn.rs +++ /dev/null @@ -1,26 +0,0 @@ -// edition:2018 -// run-pass -#![feature(must_not_suspend)] -#![warn(must_not_suspend)] - -#[must_not_suspend = "You gotta use Umm's, ya know?"] -struct Umm { - _i: i64 -} - - -fn bar() -> Umm { - Umm { - _i: 1 - } -} - -async fn other() {} - -pub async fn uhoh() { - let _guard = bar(); //~ WARNING `Umm` held across - other().await; -} - -fn main() { -} diff --git a/src/test/ui/lint/must_not_suspend/warn.stderr b/src/test/ui/lint/must_not_suspend/warn.stderr deleted file mode 100644 index fe551c652..000000000 --- a/src/test/ui/lint/must_not_suspend/warn.stderr +++ /dev/null @@ -1,26 +0,0 @@ -warning: `Umm` held across a suspend point, but should not be - --> $DIR/warn.rs:21:9 - | -LL | let _guard = bar(); - | ^^^^^^ -LL | other().await; - | ------ the value is held across this suspend point - | -note: You gotta use Umm's, ya know? - --> $DIR/warn.rs:21:9 - | -LL | let _guard = bar(); - | ^^^^^^ -help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point - --> $DIR/warn.rs:21:9 - | -LL | let _guard = bar(); - | ^^^^^^ -note: the lint level is defined here - --> $DIR/warn.rs:4:9 - | -LL | #![warn(must_not_suspend)] - | ^^^^^^^^^^^^^^^^ - -warning: 1 warning emitted - -- cgit v1.2.3