2017-02-07 21:05:30 +01:00
|
|
|
error: returning the result of a let binding from a block. Consider returning the expression directly.
|
2017-08-01 17:54:21 +02:00
|
|
|
--> $DIR/let_return.rs:10:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-02-08 14:58:07 +01:00
|
|
|
10 | x
|
2017-02-07 21:05:30 +01:00
|
|
|
| ^
|
|
|
|
|
|
2017-05-17 14:19:44 +02:00
|
|
|
= note: `-D let-and-return` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
note: this expression can be directly returned
|
2017-08-01 17:54:21 +02:00
|
|
|
--> $DIR/let_return.rs:9:13
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-02-08 14:58:07 +01:00
|
|
|
9 | let x = 5;
|
2017-02-07 21:05:30 +01:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: returning the result of a let binding from a block. Consider returning the expression directly.
|
2017-08-01 17:54:21 +02:00
|
|
|
--> $DIR/let_return.rs:16:9
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-02-08 14:58:07 +01:00
|
|
|
16 | x
|
2017-02-07 21:05:30 +01:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: this expression can be directly returned
|
2017-08-01 17:54:21 +02:00
|
|
|
--> $DIR/let_return.rs:15:17
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-02-08 14:58:07 +01:00
|
|
|
15 | let x = 5;
|
2017-02-07 21:05:30 +01:00
|
|
|
| ^
|
|
|
|
|