File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ define_tests! {
54
54
offset2,
55
55
ptrptr1,
56
56
statics,
57
+ test_attrs,
57
58
trivial,
58
59
type_annotation_rewrite,
59
60
}
Original file line number Diff line number Diff line change
1
+ #![ feature( register_tool) ]
2
+ #![ register_tool( c2rust_analyze_test) ]
3
+
4
+ // CHECK-LABEL: type assignment for "f":
5
+ // CHECK: _0 ({{.*}}: *mut i32): *mut i32
6
+ // CHECK: _1 ({{.*}}: x): *mut i32
7
+ #[ c2rust_analyze_test:: fixed_signature]
8
+ fn f ( x : * mut i32 ) -> * mut i32 {
9
+ x
10
+ }
11
+
12
+ // CHECK-LABEL: type assignment for "g":
13
+ // CHECK: _0 ({{.*}}: *mut i32): &i32
14
+ // CHECK: _1 ({{.*}}: x): &i32
15
+ #[ c2rust_analyze_test:: skip_rewrite]
16
+ fn g ( x : * mut i32 ) -> * mut i32 {
17
+ x
18
+ }
19
+
20
+ // CHECK: analysis of DefId({{.*}} ~ test_attrs[{{.*}}]::h) failed: [unknown]: explicit fail_analysis for testing
21
+ #[ c2rust_analyze_test:: fail_analysis]
22
+ fn h ( x : * mut i32 ) -> * mut i32 {
23
+ x
24
+ }
You can’t perform that action at this time.
0 commit comments