rust/tests/ui/let_return.stderr

28 lines
698 B
Text
Raw Normal View History

error: returning the result of a let binding from a block. Consider returning the expression directly.
2018-12-10 06:27:19 +01:00
--> $DIR/let_return.rs:16:5
|
2018-12-10 06:27:19 +01:00
16 | x
| ^
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
note: this expression can be directly returned
2018-12-10 06:27:19 +01:00
--> $DIR/let_return.rs:15:13
|
2018-12-10 06:27:19 +01:00
15 | let x = 5;
| ^
error: returning the result of a let binding from a block. Consider returning the expression directly.
2018-12-10 06:27:19 +01:00
--> $DIR/let_return.rs:22:9
|
2018-12-10 06:27:19 +01:00
22 | x
| ^
|
note: this expression can be directly returned
2018-12-10 06:27:19 +01:00
--> $DIR/let_return.rs:21:17
|
2018-12-10 06:27:19 +01:00
21 | let x = 5;
| ^
2018-01-16 17:06:27 +01:00
error: aborting due to 2 previous errors