]> git.lizzy.rs Git - rust.git/blob - src/test/ui/runtime/stdout-during-shutdown.rs
Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko
[rust.git] / src / test / ui / runtime / stdout-during-shutdown.rs
1 // run-pass
2 // check-run-results
3 // ignore-emscripten
4
5 // Emscripten doesn't flush its own stdout buffers on exit, which would fail
6 // this test. So this test is disabled on this platform.
7 // See https://emscripten.org/docs/getting_started/FAQ.html#what-does-exiting-the-runtime-mean-why-don-t-atexit-s-run
8
9 #![feature(rustc_private)]
10
11 extern crate libc;
12
13 fn main() {
14     extern "C" fn bye() {
15         print!(", world!");
16     }
17     unsafe { libc::atexit(bye) };
18     print!("hello");
19 }