about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-18 09:52:27 +0000
committerbors <bors@rust-lang.org>2023-05-18 09:52:27 +0000
commit22b319606f48f9c7d9fa0bef6d5e8669a38c3f83 (patch)
tree87732db781597aa06e04adbd105e047aa26f762c /tests/rustdoc-js-std/parser-errors.js
parent270cbeb735ee558e2ee74bfe127e1bad3d2eacc5 (diff)
parent79a8867addbaad8c2d15adc2accf4c9d7194136a (diff)
downloadrust-22b319606f48f9c7d9fa0bef6d5e8669a38c3f83.tar.gz
rust-22b319606f48f9c7d9fa0bef6d5e8669a38c3f83.zip
Auto merge of #10753 - disco07:master, r=xFrednet
redundant_pattern_matching

This PR try to solve this issue https://github.com/rust-lang/rust-clippy/pull/10726,
but it enter in conflict with another test.

changelog: none

Try to test this:
```
let _w = match x {
     Some(_) => true,
     _ => false,
};
```

this happen:
```
 error: match expression looks like `matches!` macro
   --> $DIR/match_expr_like_matches_macro.rs:21:14
    |
 LL |       let _w = match x {
    |  ______________^
 LL | |         Some(_) => true,
 LL | |         _ => false,
 LL | |     };
    | |_____^ help: try this: `matches!(x, Some(_))`

+error: redundant pattern matching, consider using `is_some()`
+  --> $DIR/match_expr_like_matches_macro.rs:21:14
+   |
+LL |       let _w = match x {
+   |  ______________^
+LL | |         Some(_) => true,
+LL | |         _ => false,
+LL | |     };
+   | |_____^ help: try this: `x.is_some()`
+   |
+   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
+
```
I need some help to fix this. Thanks
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions