File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
- 27af5175497936ea3413bef5816e7c0172514b9c
1
+ 51ea9bb29b07d76c5a7167d054b54f4eb7f5b44e
Original file line number Diff line number Diff line change 4
4
#![ feature( never_type) ]
5
5
#![ allow( unused, invalid_value) ]
6
6
7
- enum Void { }
7
+ mod m {
8
+ enum VoidI { }
9
+ pub struct Void ( VoidI ) ;
8
10
9
- fn f ( v : Void ) -> ! {
10
- match v { } //~ ERROR entering unreachable code
11
+ pub fn f ( v : Void ) -> ! {
12
+ match v. 0 { } //~ ERROR entering unreachable code
13
+ }
11
14
}
12
15
13
16
fn main ( ) {
14
- let v: Void = unsafe {
15
- std:: mem:: transmute :: < ( ) , Void > ( ( ) )
17
+ let v = unsafe {
18
+ std:: mem:: transmute :: < ( ) , m :: Void > ( ( ) )
16
19
} ;
17
- f ( v) ; //~ inside `main`
20
+ m :: f ( v) ; //~ inside `main`
18
21
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn never() -> Never {
29
29
}
30
30
31
31
async fn includes_never ( crash : bool , x : u32 ) -> u32 {
32
- let mut result = async { x * x } . await ;
32
+ let result = async { x * x } . await ;
33
33
if !crash {
34
34
return result;
35
35
}
You can’t perform that action at this time.
0 commit comments