diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-06-28 20:59:33 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-06-28 20:59:33 +0000 |
| commit | 57931e50409f9365791f7923a68f9ae1ec301c4c (patch) | |
| tree | 980a7c95968d23918d0743a9a9b367a40ac89d7d | |
| parent | 224cb3f638881525c00c46b012721f0aafc73263 (diff) | |
| download | rust-57931e50409f9365791f7923a68f9ae1ec301c4c.tar.gz rust-57931e50409f9365791f7923a68f9ae1ec301c4c.zip | |
add non-regression test for issue 127052
| -rw-r--r-- | tests/ui/linkage-attr/unreferenced-used-static-issue-127052.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/linkage-attr/unreferenced-used-static-issue-127052.rs b/tests/ui/linkage-attr/unreferenced-used-static-issue-127052.rs new file mode 100644 index 00000000000..aa8236b7431 --- /dev/null +++ b/tests/ui/linkage-attr/unreferenced-used-static-issue-127052.rs @@ -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() {} |
