]> git.lizzy.rs Git - rust.git/blob - tests/codegen/auxiliary/extern_decl.rs
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / codegen / auxiliary / extern_decl.rs
1 // Auxiliary crate that exports a function and static. Both always
2 // evaluate to `71`. We force mutability on the static to prevent
3 // it from being inlined as constant.
4
5 #![crate_type = "lib"]
6
7 #[no_mangle]
8 pub fn extern_fn() -> u8 { unsafe { extern_static } }
9
10 #[no_mangle]
11 pub static mut extern_static: u8 = 71;