File tree 4 files changed +39
-3
lines changed
4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 1
- // ignore-test This is currently broken
2
-
3
1
#![ allow( incomplete_features) ]
4
2
#![ feature( inline_const_pat) ]
5
3
Original file line number Diff line number Diff line change
1
+ error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
2
+ --> $DIR/pat-unsafe-err.rs:11:13
3
+ |
4
+ LL | require_unsafe();
5
+ | ^^^^^^^^^^^^^^^^ call to unsafe function
6
+ |
7
+ = note: consult the function's documentation for information on how to avoid undefined behavior
8
+
9
+ error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
10
+ --> $DIR/pat-unsafe-err.rs:18:13
11
+ |
12
+ LL | require_unsafe()
13
+ | ^^^^^^^^^^^^^^^^ call to unsafe function
14
+ |
15
+ = note: consult the function's documentation for information on how to avoid undefined behavior
16
+
17
+ error: aborting due to 2 previous errors
18
+
19
+ For more information about this error, try `rustc --explain E0133`.
Original file line number Diff line number Diff line change 1
1
// check-pass
2
- // ignore-test This is currently broken
3
2
4
3
#![ allow( incomplete_features) ]
5
4
#![ warn( unused_unsafe) ]
Original file line number Diff line number Diff line change
1
+ warning: unnecessary `unsafe` block
2
+ --> $DIR/pat-unsafe.rs:16:17
3
+ |
4
+ LL | unsafe {}
5
+ | ^^^^^^ unnecessary `unsafe` block
6
+ |
7
+ note: the lint level is defined here
8
+ --> $DIR/pat-unsafe.rs:4:9
9
+ |
10
+ LL | #![warn(unused_unsafe)]
11
+ | ^^^^^^^^^^^^^
12
+
13
+ warning: unnecessary `unsafe` block
14
+ --> $DIR/pat-unsafe.rs:23:17
15
+ |
16
+ LL | unsafe {}
17
+ | ^^^^^^ unnecessary `unsafe` block
18
+
19
+ warning: 2 warnings emitted
20
+
You can’t perform that action at this time.
0 commit comments