]> git.lizzy.rs Git - rust.git/blob - src/test/ui/abi/foreign/invoke-external-foreign.rs
Rollup merge of #95353 - jyn514:invalid-filter-hard-error, r=Mark-Simulacrum
[rust.git] / src / test / ui / abi / foreign / invoke-external-foreign.rs
1 // run-pass
2 // aux-build:foreign_lib.rs
3 // ignore-wasm32-bare no libc to test ffi with
4
5 // The purpose of this test is to check that we can
6 // successfully (and safely) invoke external, cdecl
7 // functions from outside the crate.
8
9 // pretty-expanded FIXME #23616
10
11 extern crate foreign_lib;
12
13 pub fn main() {
14     unsafe {
15         let _foo = foreign_lib::rustrt::rust_get_test_int();
16     }
17 }