blob: fe60072d13f84b21b9fbd5b2fe84a5486d1d3d3c [file] [log] [blame]
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:9:5
|
LL | let x = 5;
| ---------- unnecessary `let` binding
LL | x
| ^
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::let_and_return)]`
help: return the expression directly
|
LL ~
LL ~ 5
|
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:17:9
|
LL | let x = 5;
| ---------- unnecessary `let` binding
LL | x
| ^
|
help: return the expression directly
|
LL ~
LL ~ 5
|
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:80:5
|
LL | let line = stdin.lock().lines().next().unwrap().unwrap();
| --------------------------------------------------------- unnecessary `let` binding
LL | line
| ^^^^
|
help: return the expression directly
|
LL ~
LL ~ stdin.lock().lines().next().unwrap().unwrap()
|
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:171:13
|
LL | let clone = Arc::clone(&self.foo);
| ---------------------------------- unnecessary `let` binding
LL | clone
| ^^^^^
|
help: return the expression directly
|
LL ~
LL ~ (Arc::clone(&self.foo)) as _
|
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:190:13
|
LL | / let result = match self {
LL | | E::A(x) => x,
LL | | E::B(x) => x,
LL | | };
| |______________- unnecessary `let` binding
LL |
LL | result
| ^^^^^^
|
help: return the expression directly
|
LL ~
LL |
LL ~ (match self {
LL + E::A(x) => x,
LL + E::B(x) => x,
LL + }) as _
|
error: aborting due to 5 previous errors