rust/tests/ui/let_return.stderr

28 lines
698 B
Plaintext
Raw Normal View History

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