Update run-make/used to use any_symbol_contains
This commit is contained in:
parent
a6043039ad
commit
b564b70d1c
@ -4,12 +4,11 @@
|
|||||||
// It comes from #39987 which implements this RFC for the #[used] attribute:
|
// It comes from #39987 which implements this RFC for the #[used] attribute:
|
||||||
// https://rust-lang.github.io/rfcs/2386-used.html
|
// https://rust-lang.github.io/rfcs/2386-used.html
|
||||||
|
|
||||||
//@ ignore-msvc
|
use run_make_support::rustc;
|
||||||
|
use run_make_support::symbols::any_symbol_contains;
|
||||||
use run_make_support::{cmd, rustc};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
rustc().opt_level("3").emit("obj").input("used.rs").run();
|
rustc().opt_level("3").emit("obj").input("used.rs").run();
|
||||||
|
assert!(any_symbol_contains("used.o", &["FOO"]));
|
||||||
cmd("nm").arg("used.o").run().assert_stdout_contains("FOO");
|
assert!(!any_symbol_contains("used.o", &["BAR"]));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user