diff options
Diffstat (limited to 'src/libstd/old_io/stdio.rs')
| -rw-r--r-- | src/libstd/old_io/stdio.rs | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs index a5df21749e2..85bf4908f83 100644 --- a/src/libstd/old_io/stdio.rs +++ b/src/libstd/old_io/stdio.rs @@ -547,8 +547,9 @@ mod tests { let (tx, rx) = channel(); let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx)); + // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. let _t = thread::spawn(move|| { - set_stdout(box w); + set_stdout(Box::new(w)); println!("hello!"); }); assert_eq!(r.read_to_string().unwrap(), "hello!\n"); @@ -560,8 +561,9 @@ mod tests { let (tx, rx) = channel(); let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx)); + // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. let _t = thread::spawn(move || -> () { - set_stderr(box w); + set_stderr(Box::new(w)); panic!("my special message"); }); let s = r.read_to_string().unwrap(); | 
