Skip to content

Commit 7a95ff7

Browse files
committed
Port stdout-during-shutdown
1 parent 6f3550a commit 7a95ff7

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

tests/ui/runtime/stdout-during-shutdown.rs renamed to tests/ui/runtime/stdout-during-shutdown-unix.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-pass
22
//@ check-run-results
33
//@ ignore-emscripten
4+
//@ only-unix
45

56
// Emscripten doesn't flush its own stdout buffers on exit, which would fail
67
// this test. So this test is disabled on this platform.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//@ run-pass
2+
//@ check-run-results
3+
//@ only-windows
4+
5+
#![feature(thread_local)]
6+
7+
#[derive(Debug)]
8+
struct Bye;
9+
10+
impl Drop for Bye {
11+
fn drop(&mut self) {
12+
print!(", world!");
13+
}
14+
}
15+
16+
#[thread_local]
17+
static BYE: Bye = Bye;
18+
19+
fn main() {
20+
print!("{BYE:?} says hello");
21+
}

0 commit comments

Comments
 (0)