File tree 2 files changed +39
-0
lines changed
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ignore-test This is currently broken
2
+ // revisions: mir thir
3
+ // [thir]compile-flags: -Z thir-unsafeck
4
+
5
+ #![ allow( incomplete_features) ]
6
+ #![ feature( inline_const_pat) ]
7
+
8
+ const unsafe fn require_unsafe ( ) -> usize { 1 }
9
+
10
+ fn main ( ) {
11
+ match ( ) {
12
+ const {
13
+ require_unsafe ( ) ;
14
+ //~^ ERROR [E0133]
15
+ } => ( ) ,
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ // ignore-test This is currently broken
2
+ // check-pass
3
+ // revisions: mir thir
4
+ // [thir]compile-flags: -Z thir-unsafeck
5
+
6
+ #![ allow( incomplete_features) ]
7
+ #![ warn( unused_unsafe) ]
8
+ #![ feature( inline_const_pat) ]
9
+
10
+ const unsafe fn require_unsafe ( ) -> usize { 1 }
11
+
12
+ fn main ( ) {
13
+ unsafe {
14
+ match ( ) {
15
+ const {
16
+ require_unsafe ( ) ;
17
+ unsafe { }
18
+ //~^ WARNING unnecessary `unsafe` block
19
+ } => ( ) ,
20
+ }
21
+ }
22
+ }
You can’t perform that action at this time.
0 commit comments