summaryrefslogtreecommitdiffstats
path: root/tests/run-make/no-duplicate-libs/main.rs
blob: b25ef35ada68ebe68e65dc191751f5c0f62fb274 (plain)
1
2
3
4
5
6
7
8
9
10
#[link(name = "foo")] // linker should drop this library, no symbols used
#[link(name = "bar")] // symbol comes from this library
#[link(name = "foo")] // now linker picks up `foo` b/c `bar` library needs it
extern "C" {
    fn bar();
}

fn main() {
    unsafe { bar() }
}