]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfcs/rfc-1014-2.rs
Fix font color for help button in ayu and dark themes
[rust.git] / src / test / ui / rfcs / rfc-1014-2.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 #![feature(rustc_private)]
5
6 extern crate libc;
7
8 type DWORD = u32;
9 type HANDLE = *mut u8;
10 type BOOL = i32;
11
12 #[cfg(windows)]
13 extern "system" {
14     fn SetStdHandle(nStdHandle: DWORD, nHandle: HANDLE) -> BOOL;
15 }
16
17 #[cfg(windows)]
18 fn close_stdout() {
19     const STD_OUTPUT_HANDLE: DWORD = -11i32 as DWORD;
20     unsafe { SetStdHandle(STD_OUTPUT_HANDLE, 0 as HANDLE); }
21 }
22
23 #[cfg(windows)]
24 fn main() {
25     close_stdout();
26     println!("hello world");
27 }
28
29 #[cfg(not(windows))]
30 fn main() {}