mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-13 02:17:41 +00:00
17 lines
434 B
Rust
17 lines
434 B
Rust
//! Ensure that `#[used]` in archives are correctly registered.
|
|
//!
|
|
//! Regression test for https://github.com/rust-lang/rust/issues/133491.
|
|
|
|
//@ run-pass
|
|
//@ check-run-results
|
|
//@ aux-build: used_pre_main_constructor.rs
|
|
|
|
//@ ignore-wasm ctor doesn't work on WASM
|
|
|
|
// Make sure `rustc` links the archive, but intentionally do not import/use any items.
|
|
extern crate used_pre_main_constructor as _;
|
|
|
|
fn main() {
|
|
println!("main");
|
|
}
|