Skip to content

Commit

Permalink
Port stdout-during-shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Apr 18, 2024
1 parent 6f3550a commit 7a95ff7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
21 changes: 21 additions & 0 deletions tests/ui/runtime/stdout-during-shutdown-windows.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//@ run-pass
//@ check-run-results
//@ only-windows

#![feature(thread_local)]

#[derive(Debug)]
struct Bye;

impl Drop for Bye {
fn drop(&mut self) {
print!(", world!");
}
}

#[thread_local]
static BYE: Bye = Bye;

fn main() {
print!("{BYE:?} says hello");
}

0 comments on commit 7a95ff7

Please sign in to comment.