]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_pattern_matching_const_result.stderr
Auto merge of #5980 - matsujika:create-dir, r=flip1995
[rust.git] / tests / ui / redundant_pattern_matching_const_result.stderr
1 error: redundant pattern matching, consider using `is_ok()`
2   --> $DIR/redundant_pattern_matching_const_result.rs:10:12
3    |
4 LL |     if let Ok(_) = Ok::<i32, i32>(42) {}
5    |     -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
6    |
7    = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
8
9 error: redundant pattern matching, consider using `is_err()`
10   --> $DIR/redundant_pattern_matching_const_result.rs:12:12
11    |
12 LL |     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_ok()`
16   --> $DIR/redundant_pattern_matching_const_result.rs:14:15
17    |
18 LL |     while let Ok(_) = Ok::<i32, i32>(10) {}
19    |     ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
20
21 error: redundant pattern matching, consider using `is_err()`
22   --> $DIR/redundant_pattern_matching_const_result.rs:16:15
23    |
24 LL |     while let Err(_) = Ok::<i32, i32>(10) {}
25    |     ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
26
27 error: redundant pattern matching, consider using `is_ok()`
28   --> $DIR/redundant_pattern_matching_const_result.rs:18:5
29    |
30 LL | /     match Ok::<i32, i32>(42) {
31 LL | |         Ok(_) => true,
32 LL | |         Err(_) => false,
33 LL | |     };
34    | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
35
36 error: redundant pattern matching, consider using `is_err()`
37   --> $DIR/redundant_pattern_matching_const_result.rs:23:5
38    |
39 LL | /     match Err::<i32, i32>(42) {
40 LL | |         Ok(_) => false,
41 LL | |         Err(_) => true,
42 LL | |     };
43    | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
44
45 error: aborting due to 6 previous errors
46