Skip to content

Commit

Permalink
Update run-make/used to use any_symbol_contains
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Aug 3, 2024
1 parent a604303 commit b564b70
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/run-make/used/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
// It comes from #39987 which implements this RFC for the #[used] attribute:
// https://rust-lang.github.io/rfcs/2386-used.html

//@ ignore-msvc

use run_make_support::{cmd, rustc};
use run_make_support::rustc;
use run_make_support::symbols::any_symbol_contains;

fn main() {
rustc().opt_level("3").emit("obj").input("used.rs").run();

cmd("nm").arg("used.o").run().assert_stdout_contains("FOO");
assert!(any_symbol_contains("used.o", &["FOO"]));
assert!(!any_symbol_contains("used.o", &["BAR"]));
}

0 comments on commit b564b70

Please sign in to comment.