Skip to content

Commit bf2c5d3

Browse files
committed
Use pattern to match attributes
1 parent 19ee98f commit bf2c5d3

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/test/codegen/ffi-returns-twice.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
#![crate_type = "lib"]
33
#![feature(ffi_returns_twice)]
44

5-
extern {
6-
// CHECK-LABEL: @foo()
7-
// CHECK: attributes #1 = { {{.*}}returns_twice{{.*}} }
8-
#[no_mangle]
9-
#[ffi_returns_twice]
10-
pub fn foo();
11-
}
5+
pub fn bar() { unsafe { foo() } }
126

13-
pub fn bar() {
14-
unsafe { foo() }
7+
extern {
8+
#[ffi_returns_twice] pub fn foo();
159
}
10+
// CHECK: declare void @foo(){{.*}}#1{{.*}}
11+
// CHECK: attributes #1 = { {{.*}}returns_twice{{.*}} }

0 commit comments

Comments
 (0)