]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-extern-function.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-extern-function.rs
1 // run-pass
2 #![allow(non_upper_case_globals)]
3
4 extern fn foopy() {}
5
6 static f: extern "C" fn() = foopy;
7 static s: S = S { f: foopy };
8
9 struct S {
10     f: extern "C" fn()
11 }
12
13 pub fn main() {
14     assert!(foopy as extern "C" fn() == f);
15     assert!(f == s.f);
16 }