summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/drop-tracking-parent-expression.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/generator/drop-tracking-parent-expression.rs
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz
rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/generator/drop-tracking-parent-expression.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/ui/generator/drop-tracking-parent-expression.rs b/tests/ui/generator/drop-tracking-parent-expression.rs
index d40f1b8f6..ed9ac6d11 100644
--- a/tests/ui/generator/drop-tracking-parent-expression.rs
+++ b/tests/ui/generator/drop-tracking-parent-expression.rs
@@ -1,4 +1,7 @@
-// compile-flags: -Zdrop-tracking
+// revisions: no_drop_tracking drop_tracking drop_tracking_mir
+// [drop_tracking] compile-flags: -Zdrop-tracking
+// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
+
#![feature(generators, negative_impls, rustc_attrs)]
macro_rules! type_combinations {
@@ -18,13 +21,14 @@ macro_rules! type_combinations {
let g = move || match drop($name::Client { ..$name::Client::default() }) {
//~^ `significant_drop::Client` which is not `Send`
//~| `insignificant_dtor::Client` which is not `Send`
- //~| `derived_drop::Client` which is not `Send`
+ //[no_drop_tracking,drop_tracking]~| `derived_drop::Client` which is not `Send`
_ => yield,
};
assert_send(g);
//~^ ERROR cannot be sent between threads
//~| ERROR cannot be sent between threads
//~| ERROR cannot be sent between threads
+ //[no_drop_tracking]~| ERROR cannot be sent between threads
}
// Simple owned value. This works because the Client is considered moved into `drop`,
@@ -34,6 +38,10 @@ macro_rules! type_combinations {
_ => yield,
};
assert_send(g);
+ //[no_drop_tracking]~^ ERROR cannot be sent between threads
+ //[no_drop_tracking]~| ERROR cannot be sent between threads
+ //[no_drop_tracking]~| ERROR cannot be sent between threads
+ //[no_drop_tracking]~| ERROR cannot be sent between threads
}
)* }
}