about summary refs log tree commit diff
path: root/tests/ui/attributes/used_with_archive.rs
blob: ff29456b87d20945db28a88ceae651617cedbded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! 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");
}