File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 55#![ deny( unreachable_code) ]
66
77fn 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
1010}
1111
1212fn 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
22 --> $DIR/expr_unary.rs:8:16
33 |
4- LL | let x: ! = ! { return; };
5- | ^^^^^^^^^^^^^ cannot apply unary operator `!`
4+ LL | let x: ! = * { return; };
5+ | ^^^^^^^^^^^^^
66
77error: unreachable expression
88 --> $DIR/expr_unary.rs:8:16
99 |
10- LL | let x: ! = ! { return; };
10+ LL | let x: ! = * { return; };
1111 | ^^^^------^^^
1212 | | |
1313 | | any code following this expression is unreachable
@@ -21,4 +21,4 @@ LL | #![deny(unreachable_code)]
2121
2222error: aborting due to 2 previous errors
2323
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