]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/if_let_some_result.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / tools / clippy / tests / ui / if_let_some_result.stderr
CommitLineData
f20569fa
XL
1error: matching on `Some` with `ok()` is redundant
2 --> $DIR/if_let_some_result.rs:6:5
3 |
4LL | if let Some(y) = x.parse().ok() { y } else { 0 }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::if-let-some-result` implied by `-D warnings`
8help: consider matching on `Ok(y)` and removing the call to `ok` instead
9 |
10LL | if let Ok(y) = x.parse() { y } else { 0 }
11 | ^^^^^^^^^^^^^^^^^^^^^^^^
12
13error: matching on `Some` with `ok()` is redundant
14 --> $DIR/if_let_some_result.rs:16:9
15 |
16LL | if let Some(y) = x . parse() . ok () {
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 |
19help: consider matching on `Ok(y)` and removing the call to `ok` instead
20 |
21LL | if let Ok(y) = x . parse() {
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
24error: aborting due to 2 previous errors
25