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 {
307
307
impl < ' tcx > FileHandler {
308
308
pub ( crate ) fn new ( mute_stdout_stderr : bool ) -> FileHandler {
309
309
let mut handles: BTreeMap < _ , Box < dyn FileDescriptor > > = BTreeMap :: new ( ) ;
310
+ handles. insert ( 0i32 , Box :: new ( io:: stdin ( ) ) ) ;
310
311
if mute_stdout_stderr {
311
- handles. insert ( 0i32 , Box :: new ( DummyOutput ) ) ;
312
312
handles. insert ( 1i32 , Box :: new ( DummyOutput ) ) ;
313
+ handles. insert ( 2i32 , Box :: new ( DummyOutput ) ) ;
313
314
} else {
314
- handles. insert ( 0i32 , Box :: new ( io:: stdin ( ) ) ) ;
315
315
handles. insert ( 1i32 , Box :: new ( io:: stdout ( ) ) ) ;
316
+ handles. insert ( 2i32 , Box :: new ( io:: stderr ( ) ) ) ;
316
317
}
317
- handles. insert ( 2i32 , Box :: new ( io:: stderr ( ) ) ) ;
318
318
FileHandler { handles }
319
319
}
320
320
Original file line number Diff line number Diff line change 1
1
// compile-flags: -Zmiri-mute-stdout-stderr
2
2
3
3
fn main ( ) {
4
- println ! ( "cake" ) ;
4
+ println ! ( "print to stdout" ) ;
5
+ eprintln ! ( "print to stderr" ) ;
5
6
}
You can’t perform that action at this time.
0 commit comments