Port stdout-during-shutdown
This commit is contained in:
parent
70147cd3ab
commit
7a906e1af7
@ -1,6 +1,7 @@
|
||||
//@ run-pass
|
||||
//@ check-run-results
|
||||
//@ ignore-emscripten
|
||||
//@ only-unix
|
||||
|
||||
// Emscripten doesn't flush its own stdout buffers on exit, which would fail
|
||||
// this test. So this test is disabled on this platform.
|
20
tests/ui/runtime/stdout-during-shutdown-windows.rs
Normal file
20
tests/ui/runtime/stdout-during-shutdown-windows.rs
Normal file
@ -0,0 +1,20 @@
|
||||
//@ run-pass
|
||||
//@ check-run-results
|
||||
//@ only-windows
|
||||
|
||||
struct Bye;
|
||||
|
||||
impl Drop for Bye {
|
||||
fn drop(&mut self) {
|
||||
print!(", world!");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
thread_local!{
|
||||
static BYE: Bye = Bye;
|
||||
}
|
||||
BYE.with(|_| {
|
||||
print!("hello");
|
||||
});
|
||||
}
|
@ -0,0 +1 @@
|
||||
hello, world!
|
Loading…
x
Reference in New Issue
Block a user