mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 08:18:44 +00:00
15 lines
404 B
Rust
15 lines
404 B
Rust
//@ run-pass
|
|
//@ aux-build:weak-lang-items.rs
|
|
|
|
|
|
extern crate weak_lang_items as other;
|
|
|
|
fn main() {
|
|
// The goal of the test is just to make sure other::foo() is referenced at link time. Since
|
|
// the function panics, to prevent it from running we gate it behind an always-false `if` that
|
|
// is not going to be optimized away.
|
|
if std::hint::black_box(false) {
|
|
other::foo();
|
|
}
|
|
}
|