Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
Rollup merge of rust-lang#127115 - RalfJung:unreferenced-used-static,…
Browse files Browse the repository at this point in the history
… r=lqd,ChrisDenton

unreferenced-used-static: run test everywhere

Follow-up to rust-lang#127099.
  • Loading branch information
jhpratt authored Jul 3, 2024
2 parents 3e6f6de + cf6f6ca commit 18ec452
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// This is a non-regression test for issue #127052 where unreferenced `#[used]` statics couldn't be
// removed by the MSVC linker, causing linking errors.
// This is a non-regression test for issue #127052 where unreferenced `#[used]` statics in the
// binary crate would be marked as "exported", but not be present in the binary, causing linking
// errors with the MSVC linker.

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

#[used]
static FOO: u32 = 0;

fn main() {}

0 comments on commit 18ec452

Please sign in to comment.