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