File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 5
5
#![ deny( unreachable_code) ]
6
6
7
7
fn foo ( ) {
8
- let x: ! = ! { return ; } ; //~ ERROR unreachable
9
- //~| ERROR cannot apply unary operator `!` to type `!`
8
+ let x: ! = * { return ; } ; //~ ERROR unreachable
9
+ //~| ERROR type `!` cannot be dereferenced
10
10
}
11
11
12
12
fn main ( ) { }
Original file line number Diff line number Diff line change 1
- error[E0600 ]: cannot apply unary operator `!` to type `!`
1
+ error[E0614 ]: type `!` cannot be dereferenced
2
2
--> $DIR/expr_unary.rs:8:16
3
3
|
4
- LL | let x: ! = ! { return; };
5
- | ^^^^^^^^^^^^^ cannot apply unary operator `!`
4
+ LL | let x: ! = * { return; };
5
+ | ^^^^^^^^^^^^^
6
6
7
7
error: unreachable expression
8
8
--> $DIR/expr_unary.rs:8:16
9
9
|
10
- LL | let x: ! = ! { return; };
10
+ LL | let x: ! = * { return; };
11
11
| ^^^^------^^^
12
12
| | |
13
13
| | any code following this expression is unreachable
@@ -21,4 +21,4 @@ LL | #![deny(unreachable_code)]
21
21
22
22
error: aborting due to 2 previous errors
23
23
24
- For more information about this error, try `rustc --explain E0600 `.
24
+ For more information about this error, try `rustc --explain E0614 `.
You can’t perform that action at this time.
0 commit comments