2019-09-18 15:10:19 +00:00
|
|
|
warning: unreachable expression
|
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:41:9
|
|
|
|
|
|
2019-09-22 14:09:10 +00:00
|
|
|
LL | return;
|
|
|
|
| ------ any code following this expression is unreachable
|
2022-06-08 18:07:59 +00:00
|
|
|
LL |
|
2019-09-18 15:10:19 +00:00
|
|
|
LL | / try {
|
|
|
|
LL | | loop {
|
|
|
|
LL | | err()?;
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2019-09-22 14:09:10 +00:00
|
|
|
| |_________^ unreachable expression
|
2019-09-18 15:10:19 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2019-09-18 15:10:19 +00:00
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:6:9
|
|
|
|
|
|
|
|
|
LL | #![warn(unreachable_code)]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: unreachable call
|
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:52:9
|
|
|
|
|
|
|
|
|
LL | Err(return)
|
2019-09-22 14:09:10 +00:00
|
|
|
| ^^^ ------ any code following this expression is unreachable
|
|
|
|
| |
|
|
|
|
| unreachable call
|
2019-09-18 15:10:19 +00:00
|
|
|
|
|
|
|
warning: unreachable expression
|
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:63:9
|
|
|
|
|
|
2019-09-22 14:09:10 +00:00
|
|
|
LL | / loop {
|
|
|
|
LL | | err()?;
|
|
|
|
LL | | }
|
|
|
|
| |_________- any code following this expression is unreachable
|
2022-06-08 18:07:59 +00:00
|
|
|
LL |
|
2019-09-22 14:09:10 +00:00
|
|
|
LL | 42
|
|
|
|
| ^^ unreachable expression
|
2019-09-18 15:10:19 +00:00
|
|
|
|
2020-03-11 15:30:09 +00:00
|
|
|
warning: 3 warnings emitted
|
|
|
|
|