]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/unwarned-match-on-never.stderr
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / unwarned-match-on-never.stderr
1 error: unreachable expression
2   --> $DIR/unwarned-match-on-never.rs:10:5
3    |
4 LL |     match x {}
5    |           - any code following this expression is unreachable
6 LL |     // But matches in unreachable code are warned.
7 LL |     match x {}
8    |     ^^^^^^^^^^ unreachable expression
9    |
10 note: the lint level is defined here
11   --> $DIR/unwarned-match-on-never.rs:1:9
12    |
13 LL | #![deny(unreachable_code)]
14    |         ^^^^^^^^^^^^^^^^
15
16 error: unreachable arm
17   --> $DIR/unwarned-match-on-never.rs:15:15
18    |
19 LL |     match (return) {
20    |           -------- any code following this expression is unreachable
21 LL |         () => ()
22    |               ^^ unreachable arm
23
24 error: unreachable expression
25   --> $DIR/unwarned-match-on-never.rs:21:5
26    |
27 LL |       return;
28    |       ------ any code following this expression is unreachable
29 LL | /     match () {
30 LL | |         () => (),
31 LL | |     }
32    | |_____^ unreachable expression
33
34 error: aborting due to 3 previous errors
35