rust/tests/fail/fs/close_stdout.rs
2022-07-25 17:57:56 +00:00

13 lines
299 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)
#![feature(rustc_private)]
fn main() {
unsafe {
libc::close(1); //~ ERROR: cannot close stdout
}
}