Use pattern to match attributes

This commit is contained in:
gnzlbg 2019-02-10 09:59:07 +01:00
parent 52ba07dbe6
commit 76403e5742

View file

@ -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{{.*}} }