]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/ffi-pure.rs
Rollup merge of #100567 - Rageking8:fix-100563, r=wesleywiser
[rust.git] / src / test / codegen / ffi-pure.rs
1 // compile-flags: -C no-prepopulate-passes
2 #![crate_type = "lib"]
3 #![feature(ffi_pure)]
4
5 pub fn bar() { unsafe { foo() } }
6
7 extern "C" {
8     // CHECK-LABEL: declare{{.*}}void @foo()
9     // CHECK-SAME: [[ATTRS:#[0-9]+]]
10     // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}readonly{{.*}} }
11     #[ffi_pure] pub fn foo();
12 }