mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
433da1fc04
They pass fine.
11 lines
273 B
Rust
11 lines
273 B
Rust
#[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() }
|
|
}
|