rust/tests/fail/fs/close_stdout.rs

15 lines
323 B
Rust
Raw Normal View History

//@ignore-target-windows: No libc on Windows
2022-07-08 11:08:32 -05:00
//@compile-flags: -Zmiri-disable-isolation
// FIXME: standard handles cannot be closed (https://github.com/rust-lang/rust/issues/40032)
#![feature(rustc_private)]
extern crate libc;
fn main() {
unsafe {
libc::close(1); //~ ERROR: stdout cannot be closed
}
}