2022-06-04 11:34:07 +00:00
|
|
|
error: returning the result of a `let` binding from a block
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-8850.rs:4:5
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
|
|
|
LL | let res = FN() + 1;
|
|
|
|
| ------------------- unnecessary `let` binding
|
|
|
|
LL | res
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::let_and_return)]`
|
2022-06-04 11:34:07 +00:00
|
|
|
help: return the expression directly
|
|
|
|
|
|
|
|
|
LL ~
|
|
|
|
LL ~ FN() + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
error: returning the result of a `let` binding from a block
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-8850.rs:12:5
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
|
|
|
LL | let res = FN() + 1;
|
|
|
|
| ------------------- unnecessary `let` binding
|
|
|
|
LL | res
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: return the expression directly
|
|
|
|
|
|
|
|
|
LL ~
|
|
|
|
LL ~ FN() + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
error: returning the result of a `let` binding from a block
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-8850.rs:27:5
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
|
|
|
LL | let res = FN() + 1;
|
|
|
|
| ------------------- unnecessary `let` binding
|
|
|
|
LL | res
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: return the expression directly
|
|
|
|
|
|
|
|
|
LL ~
|
|
|
|
LL ~ FN() + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|