Skip to content

Commit

Permalink
add non-regression test for issue 127052
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Jun 28, 2024
1 parent 224cb3f commit 57931e5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This is a non-regression test for issue #127052 where unreferenced `#[used]` statics couldn't be
// removed by the MSVC linker, causing linking errors.

//@ build-pass: needs linking
//@ only-msvc

#[used]
static FOO: u32 = 0;
fn main() {}

0 comments on commit 57931e5

Please sign in to comment.