2019-09-18 18:10:19 +03:00
|
|
|
warning: unreachable expression
|
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:41:9
|
|
|
|
|
|
2019-09-22 17:09:10 +03:00
|
|
|
LL | return;
|
|
|
|
| ------ any code following this expression is unreachable
|
2022-06-08 21:07:59 +03:00
|
|
|
LL |
|
2019-09-18 18:10:19 +03:00
|
|
|
LL | / try {
|
|
|
|
LL | | loop {
|
|
|
|
LL | | err()?;
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2019-09-22 17:09:10 +03:00
|
|
|
| |_________^ unreachable expression
|
2019-09-18 18:10:19 +03:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2019-09-18 18:10:19 +03: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 17:09:10 +03:00
|
|
|
| ^^^ ------ any code following this expression is unreachable
|
|
|
|
| |
|
|
|
|
| unreachable call
|
2019-09-18 18:10:19 +03:00
|
|
|
|
|
|
|
warning: unreachable expression
|
|
|
|
--> $DIR/try-block-unreachable-code-lint.rs:63:9
|
|
|
|
|
|
2019-09-22 17:09:10 +03:00
|
|
|
LL | / loop {
|
|
|
|
LL | | err()?;
|
|
|
|
LL | | }
|
|
|
|
| |_________- any code following this expression is unreachable
|
2022-06-08 21:07:59 +03:00
|
|
|
LL |
|
2019-09-22 17:09:10 +03:00
|
|
|
LL | 42
|
|
|
|
| ^^ unreachable expression
|
2019-09-18 18:10:19 +03:00
|
|
|
|
2020-03-11 16:30:09 +01:00
|
|
|
warning: 3 warnings emitted
|
|
|
|
|