]> git.lizzy.rs Git - rust.git/blob - tests/codegen/ffi-returns-twice.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / codegen / ffi-returns-twice.rs
1 // compile-flags: -C no-prepopulate-passes
2 #![crate_type = "lib"]
3 #![feature(ffi_returns_twice)]
4
5 pub fn bar() { unsafe { foo() } }
6
7 extern "C" {
8     // CHECK: declare{{( dso_local)?}} void @foo(){{.*}}[[ATTRS:#[0-9]+]]
9     // CHECK: attributes [[ATTRS]] = { {{.*}}returns_twice{{.*}} }
10     #[ffi_returns_twice] pub fn foo();
11 }