blob: 4ca0a05c858fba5153a2e297ef6ca7a93a60a581 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
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: return the expression directly
|
LL ~
LL ~ 5
|
error: returning the result of a `let` binding from a block
--> $DIR/let_and_return.rs:15: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:77: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:167: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: aborting due to 4 previous errors
|