]> git.lizzy.rs Git - rust.git/blob - tests/ui/if_let_redundant_pattern_matching.stderr
Merge pull request #2984 from flip1995/single_char_pattern
[rust.git] / tests / ui / if_let_redundant_pattern_matching.stderr
1 error: redundant pattern matching, consider using `is_ok()`
2  --> $DIR/if_let_redundant_pattern_matching.rs:9:12
3   |
4 9 |     if let Ok(_) = Ok::<i32, i32>(42) {}
5   |     -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
6   |
7   = note: `-D if-let-redundant-pattern-matching` implied by `-D warnings`
8
9 error: redundant pattern matching, consider using `is_err()`
10   --> $DIR/if_let_redundant_pattern_matching.rs:11:12
11    |
12 11 |     if let Err(_) = Err::<i32, i32>(42) {
13    |     -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
14
15 error: redundant pattern matching, consider using `is_none()`
16   --> $DIR/if_let_redundant_pattern_matching.rs:14:12
17    |
18 14 |     if let None = None::<()> {
19    |     -------^^^^------------- help: try this: `if None::<()>.is_none()`
20
21 error: redundant pattern matching, consider using `is_some()`
22   --> $DIR/if_let_redundant_pattern_matching.rs:17:12
23    |
24 17 |     if let Some(_) = Some(42) {
25    |     -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
26
27 error: aborting due to 4 previous errors
28