mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
22 lines
387 B
Rust
22 lines
387 B
Rust
// Regression test for #84455 and #115052.
|
|
//@ run-pass
|
|
//@ aux-build:static_init_aux.rs
|
|
extern crate static_init_aux as aux;
|
|
|
|
static V: &u32 = aux::V;
|
|
static F: fn() = aux::F;
|
|
static G: fn() = aux::G;
|
|
static H: &(dyn Fn() + Sync) = aux::H;
|
|
static I: fn() = aux::I;
|
|
|
|
fn v() -> *const u32 {
|
|
V
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(aux::v(), crate::v());
|
|
F();
|
|
G();
|
|
H();
|
|
I();
|
|
}
|