blob: 39120f0bdf980a87fc69830d7a6534e55a9bf81d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
error: unreachable expression
--> $DIR/expr_unary.rs:19:28
|
19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable
| ^^
|
note: lint level defined here
--> $DIR/expr_unary.rs:14:9
|
14 | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
error: cannot coerce `{integer}` to !
--> $DIR/expr_unary.rs:19:28
|
19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable
| ^^
|
note: lint level defined here
--> $DIR/expr_unary.rs:15:9
|
15 | #![deny(coerce_never)]
| ^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #46325 <https://github.com/rust-lang/rust/issues/46325>
error[E0600]: cannot apply unary operator `!` to type `!`
--> $DIR/expr_unary.rs:19:16
|
19 | let x: ! = ! { return; 22 }; //~ ERROR unreachable
| ^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
|