]> git.proxmox.com Git - rustc.git/blob - tests/codegen/auxiliary/extern_decl.rs
New upstream version 1.68.2+dfsg1
[rustc.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;