From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/generator/not-send-sync.rs | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 tests/ui/generator/not-send-sync.rs (limited to 'tests/ui/generator/not-send-sync.rs') diff --git a/tests/ui/generator/not-send-sync.rs b/tests/ui/generator/not-send-sync.rs deleted file mode 100644 index 16c8cd476..000000000 --- a/tests/ui/generator/not-send-sync.rs +++ /dev/null @@ -1,27 +0,0 @@ -#![feature(generators)] -#![feature(negative_impls)] - -struct NotSend; -struct NotSync; - -impl !Send for NotSend {} -impl !Sync for NotSync {} - -fn main() { - fn assert_sync(_: T) {} - fn assert_send(_: T) {} - - assert_sync(|| { - //~^ ERROR: generator cannot be shared between threads safely - let a = NotSync; - yield; - drop(a); - }); - - assert_send(|| { - //~^ ERROR: generator cannot be sent between threads safely - let a = NotSend; - yield; - drop(a); - }); -} -- cgit v1.2.3