]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_single_binding2.stderr
Handle imports which are nested directly
[rust.git] / tests / ui / match_single_binding2.stderr
1 error: this match could be written as a `let` statement
2   --> $DIR/match_single_binding2.rs:18:36
3    |
4 LL |               Some((iter, _item)) => match iter.size_hint() {
5    |  ____________________________________^
6 LL | |                 (min, max) => (min.saturating_add(1), max.and_then(|max| max.checked_add(1))),
7 LL | |             },
8    | |_____________^
9    |
10    = note: `-D clippy::match-single-binding` implied by `-D warnings`
11 help: consider using `let` statement
12    |
13 LL |             Some((iter, _item)) => {
14 LL |                 let (min, max) = iter.size_hint();
15 LL |                 (min.saturating_add(1), max.and_then(|max| max.checked_add(1)))
16 LL |             },
17    |
18
19 error: this match could be written as a `let` statement
20   --> $DIR/match_single_binding2.rs:31:13
21    |
22 LL | /             match get_tup() {
23 LL | |                 (a, b) => println!("a {:?} and b {:?}", a, b),
24 LL | |             }
25    | |_____________^
26    |
27 help: consider using `let` statement
28    |
29 LL |             let (a, b) = get_tup();
30 LL |             println!("a {:?} and b {:?}", a, b);
31    |
32
33 error: aborting due to 2 previous errors
34