diff options
Diffstat (limited to 'tests/ui/threads-sendsync/task-stderr.rs')
| -rw-r--r-- | tests/ui/threads-sendsync/task-stderr.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs index cad10c7a792..3934084e02a 100644 --- a/tests/ui/threads-sendsync/task-stderr.rs +++ b/tests/ui/threads-sendsync/task-stderr.rs @@ -4,20 +4,21 @@ #![feature(internal_output_capture)] -use std::io; -use std::str; use std::sync::{Arc, Mutex}; -use std::thread; +use std::{io, str, thread}; fn main() { let data = Arc::new(Mutex::new(Vec::new())); - let res = thread::Builder::new().spawn({ - let data = data.clone(); - move || { - io::set_output_capture(Some(data)); - panic!("Hello, world!") - } - }).unwrap().join(); + let res = thread::Builder::new() + .spawn({ + let data = data.clone(); + move || { + io::set_output_capture(Some(data)); + panic!("Hello, world!") + } + }) + .unwrap() + .join(); assert!(res.is_err()); let output = data.lock().unwrap(); |
