about summary refs log tree commit diff
path: root/tests/run-make/ls-metadata/rmake.rs
blob: 42db97a292bed80b18d23c35a01ddbe855ba327e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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

use run_make_support::{rfs, rustc};

fn main() {
    rustc().input("foo.rs").run();
    rustc().arg("-Zls=root").input("foo").run();
    rfs::create_file("bar");
    rustc().arg("-Zls=root").input("bar").run();
}