Skip to content

Commit 57931e5

Browse files
committed
add non-regression test for issue 127052
1 parent 224cb3f commit 57931e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This is a non-regression test for issue #127052 where unreferenced `#[used]` statics couldn't be
2+
// removed by the MSVC linker, causing linking errors.
3+
4+
//@ build-pass: needs linking
5+
//@ only-msvc
6+
7+
#[used]
8+
static FOO: u32 = 0;
9+
fn main() {}

0 commit comments

Comments
 (0)