2022-07-17 20:54:10 -05:00
|
|
|
//@ignore-target-windows: No libc on Windows
|
2020-08-01 06:38:28 -05:00
|
|
|
|
|
|
|
#![feature(rustc_private)]
|
|
|
|
|
|
|
|
extern crate libc;
|
|
|
|
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
|
|
let bytes = b"hello";
|
|
|
|
unsafe {
|
2022-07-11 06:44:55 -05:00
|
|
|
libc::write(0, bytes.as_ptr() as *const libc::c_void, 5); //~ ERROR: cannot write to stdin
|
2020-08-01 06:38:28 -05:00
|
|
|
}
|
|
|
|
Ok(())
|
|
|
|
}
|