rust/tests/ui/attributes/used_with_archive.rs
2025-02-24 04:04:59 +01:00

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");
}