rust/tests/run-make/ls-metadata/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
542 B
Rust
Raw Normal View History

2024-06-06 13:51:55 -05:00
// Passing invalid files to -Z ls (which lists the symbols
// defined by a library crate) used to cause a segmentation fault.
// As this was fixed in #11262, this test checks that no segfault
// occurs when passing the invalid file `bar` to -Z ls.
// See https://github.com/rust-lang/rust/issues/11259
//@ ignore-cross-compile
2024-06-06 14:20:42 -05:00
use run_make_support::{rfs, rustc};
2024-06-06 13:51:55 -05:00
fn main() {
2024-06-06 14:20:42 -05:00
rustc().input("foo.rs").run();
rustc().arg("-Zls=root").input("foo").run();
rfs::create_file("bar");
2024-06-06 14:20:42 -05:00
rustc().arg("-Zls=root").input("bar").run();
2024-06-06 13:51:55 -05:00
}