mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Use pattern to match attributes
This commit is contained in:
@@ -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{{.*}} }
|
||||
|
||||
Reference in New Issue
Block a user