]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/let_if_seq.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / let_if_seq.stderr
CommitLineData
ea8adc8c
XL
1error: `if _ { .. } else { .. }` is an expression
2 --> $DIR/let_if_seq.rs:57:5
3 |
457 | / let mut foo = 0;
558 | | if f() {
659 | | foo = 42;
760 | | }
8 | |_____^ help: it is more idiomatic to write: `let <mut> foo = if f() { 42 } else { 0 };`
9 |
10 = note: `-D useless-let-if-seq` implied by `-D warnings`
11 = note: you might not need `mut` at all
12
13error: `if _ { .. } else { .. }` is an expression
14 --> $DIR/let_if_seq.rs:62:5
15 |
1662 | / let mut bar = 0;
1763 | | if f() {
1864 | | f();
1965 | | bar = 42;
20... |
2168 | | f();
2269 | | }
23 | |_____^ help: it is more idiomatic to write: `let <mut> bar = if f() { ..; 42 } else { ..; 0 };`
24 |
25 = note: you might not need `mut` at all
26
27error: `if _ { .. } else { .. }` is an expression
28 --> $DIR/let_if_seq.rs:71:5
29 |
3071 | / let quz;
3172 | | if f() {
3273 | | quz = 42;
3374 | | } else {
3475 | | quz = 0;
3576 | | }
36 | |_____^ help: it is more idiomatic to write: `let quz = if f() { 42 } else { 0 };`
37
38error: `if _ { .. } else { .. }` is an expression
39 --> $DIR/let_if_seq.rs:100:5
40 |
41100 | / let mut baz = 0;
42101 | | if f() {
43102 | | baz = 42;
44103 | | }
45 | |_____^ help: it is more idiomatic to write: `let <mut> baz = if f() { 42 } else { 0 };`
46 |
47 = note: you might not need `mut` at all
48