rust/tests/fail/shims/fs/close_stdout.rs
2022-08-17 22:02:20 -04:00

11 lines
271 B
Rust

//@ignore-target-windows: No libc on Windows
//@compile-flags: -Zmiri-disable-isolation
// FIXME: standard handles cannot be closed (https://github.com/rust-lang/rust/issues/40032)
fn main() {
unsafe {
libc::close(1); //~ ERROR: cannot close stdout
}
}