Skip to content

Commit 881e093

Browse files
committed
Replace ! with * in ui test of unary expr reachability
1 parent 9e83478 commit 881e093

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/ui/reachable/expr_unary.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#![deny(unreachable_code)]
66

77
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
1010
}
1111

1212
fn main() { }

src/test/ui/reachable/expr_unary.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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

77
error: 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

2222
error: 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`.

0 commit comments

Comments
 (0)