Skip to content

Commit

Permalink
Use pattern to match attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Feb 23, 2019
1 parent 52ba07d commit 76403e5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/test/codegen/ffi-returns-twice.rs
Expand Up @@ -2,14 +2,10 @@
#![crate_type = "lib"]
#![feature(ffi_returns_twice)]

extern {
// CHECK-LABEL: @foo()
// CHECK: attributes #1 = { {{.*}}returns_twice{{.*}} }
#[no_mangle]
#[ffi_returns_twice]
pub fn foo();
}
pub fn bar() { unsafe { foo() } }

pub fn bar() {
unsafe { foo() }
extern {
#[ffi_returns_twice] pub fn foo();
}
// CHECK: declare void @foo(){{.*}}#1{{.*}}
// CHECK: attributes #1 = { {{.*}}returns_twice{{.*}} }

0 comments on commit 76403e5

Please sign in to comment.