Skip to content

Commit 945cbe4

Browse files
committed
Use pattern to match attributes
1 parent bf149c0 commit 945cbe4

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/test/codegen/ffi-const.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
#![crate_type = "lib"]
33
#![feature(ffi_const)]
44

5-
// CHECK-LABEL: @bar()
6-
#[no_mangle]
75
pub fn bar() { unsafe { foo() } }
86

9-
107
extern {
11-
// CHECK-LABEL: @foo() unnamed_addr #1
12-
// CHECK: attributes #1 = { {{.*}}readnone{{.*}} }
13-
#[no_mangle]
14-
#[ffi_const]
15-
pub fn foo();
8+
#[ffi_const] pub fn foo();
169
}
10+
// CHECK: declare void @foo(){{.*}}#1{{.*}}
11+
// CHECK: attributes #1 = { {{.*}}readnone{{.*}} }

src/test/codegen/ffi-pure.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
#![crate_type = "lib"]
33
#![feature(ffi_pure)]
44

5-
// CHECK-LABEL: @bar()
6-
#[no_mangle]
75
pub fn bar() { unsafe { foo() } }
86

97
extern {
10-
// CHECK-LABEL: @foo() unnamed_addr #1
11-
// CHECK: attributes #1 = { {{.*}}readonly{{.*}} }
128
#[ffi_pure] pub fn foo();
139
}
10+
// CHECK: declare void @foo(){{.*}}#1{{.*}}
11+
// CHECK: attributes #1 = { {{.*}}readonly{{.*}} }

0 commit comments

Comments
 (0)