]> git.lizzy.rs Git - rust.git/blob - src/test/ui/functions-closures/fn-abi.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / functions-closures / fn-abi.rs
1 // run-pass
2 // Ensure that declarations and types which use `extern fn` both have the same
3 // ABI (#9309).
4
5 // pretty-expanded FIXME #23616
6 // aux-build:fn-abi.rs
7
8 extern crate fn_abi;
9
10 extern "C" {
11     fn foo();
12 }
13
14 pub fn main() {
15     // Will only type check if the type of _p and the decl of foo use the
16     // same ABI
17     let _p: unsafe extern "C" fn() = foo;
18 }