rust/tests/ui/if_let_redundant_pattern_matching.stderr

29 lines
1.1 KiB
Plaintext
Raw Normal View History

error: redundant pattern matching, consider using `is_ok()`
2017-08-01 10:54:21 -05:00
--> $DIR/if_let_redundant_pattern_matching.rs:9:12
|
9 | if let Ok(_) = Ok::<i32, i32>(42) {}
2017-07-21 03:40:23 -05:00
| -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
|
= note: `-D if-let-redundant-pattern-matching` implied by `-D warnings`
error: redundant pattern matching, consider using `is_err()`
2017-08-01 10:54:21 -05:00
--> $DIR/if_let_redundant_pattern_matching.rs:11:12
|
11 | if let Err(_) = Err::<i32, i32>(42) {
2017-07-21 03:40:23 -05:00
| -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
error: redundant pattern matching, consider using `is_none()`
2017-08-01 10:54:21 -05:00
--> $DIR/if_let_redundant_pattern_matching.rs:14:12
|
14 | if let None = None::<()> {
2017-07-21 03:40:23 -05:00
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
error: redundant pattern matching, consider using `is_some()`
2017-08-01 10:54:21 -05:00
--> $DIR/if_let_redundant_pattern_matching.rs:17:12
|
17 | if let Some(_) = Some(42) {
2017-07-21 03:40:23 -05:00
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
2017-07-02 23:37:30 -05:00
error: aborting due to 4 previous errors