From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/threads-sendsync/issue-24313.rs | 32 ----------------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/test/ui/threads-sendsync/issue-24313.rs (limited to 'src/test/ui/threads-sendsync/issue-24313.rs') diff --git a/src/test/ui/threads-sendsync/issue-24313.rs b/src/test/ui/threads-sendsync/issue-24313.rs deleted file mode 100644 index c28b4ca96..000000000 --- a/src/test/ui/threads-sendsync/issue-24313.rs +++ /dev/null @@ -1,32 +0,0 @@ -// run-pass -// ignore-emscripten no threads -// ignore-sgx no processes - -use std::thread; -use std::env; -use std::process::Command; - -struct Handle(i32); - -impl Drop for Handle { - fn drop(&mut self) { panic!(); } -} - -thread_local!(static HANDLE: Handle = Handle(0)); - -fn main() { - let args = env::args().collect::>(); - if args.len() == 1 { - let out = Command::new(&args[0]).arg("test").output().unwrap(); - let stderr = std::str::from_utf8(&out.stderr).unwrap(); - assert!(stderr.contains("panicked at 'explicit panic'"), - "bad failure message:\n{}\n", stderr); - } else { - // TLS dtors are not always run on process exit - thread::spawn(|| { - HANDLE.with(|h| { - println!("{}", h.0); - }); - }).join().unwrap(); - } -} -- cgit v1.2.3