File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -307,14 +307,14 @@ pub struct FileHandler {
307307impl < ' tcx > FileHandler {
308308 pub ( crate ) fn new ( mute_stdout_stderr : bool ) -> FileHandler {
309309 let mut handles: BTreeMap < _ , Box < dyn FileDescriptor > > = BTreeMap :: new ( ) ;
310+ handles. insert ( 0i32 , Box :: new ( io:: stdin ( ) ) ) ;
310311 if mute_stdout_stderr {
311- handles. insert ( 0i32 , Box :: new ( DummyOutput ) ) ;
312312 handles. insert ( 1i32 , Box :: new ( DummyOutput ) ) ;
313+ handles. insert ( 2i32 , Box :: new ( DummyOutput ) ) ;
313314 } else {
314- handles. insert ( 0i32 , Box :: new ( io:: stdin ( ) ) ) ;
315315 handles. insert ( 1i32 , Box :: new ( io:: stdout ( ) ) ) ;
316+ handles. insert ( 2i32 , Box :: new ( io:: stderr ( ) ) ) ;
316317 }
317- handles. insert ( 2i32 , Box :: new ( io:: stderr ( ) ) ) ;
318318 FileHandler { handles }
319319 }
320320
Original file line number Diff line number Diff line change 11// compile-flags: -Zmiri-mute-stdout-stderr
22
33fn main ( ) {
4- println ! ( "cake" ) ;
4+ println ! ( "print to stdout" ) ;
5+ eprintln ! ( "print to stderr" ) ;
56}
You can’t perform that action at this time.
0 commit comments