2017-02-07 14:05:30 -06:00
|
|
|
error: returning the result of a let binding from a block. Consider returning the expression directly.
|
|
|
|
--> $DIR/let_return.rs:10:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
10 | x
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/let_return.rs:5:9
|
|
|
|
|
|
|
|
|
5 | #![deny(let_and_return)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
note: this expression can be directly returned
|
|
|
|
--> $DIR/let_return.rs:9:13
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
9 | let x = 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: returning the result of a let binding from a block. Consider returning the expression directly.
|
|
|
|
--> $DIR/let_return.rs:16:9
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
16 | x
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: this expression can be directly returned
|
|
|
|
--> $DIR/let_return.rs:15:17
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
15 | let x = 5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|