mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
parent
729b2daf27
commit
c7df4bd000
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "clippy"
|
||||
version = "0.0.22"
|
||||
version = "0.0.23"
|
||||
authors = [
|
||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||
"Andre Bogus <bogusandre@gmail.com>",
|
||||
|
@ -38,7 +38,7 @@ impl LateLintPass for MatchPass {
|
||||
// since the exhaustiveness check will ensure the last one is a catch-all,
|
||||
// but in some cases, an explicit match is preferred to catch situations
|
||||
// when an enum is extended, so we don't consider these cases
|
||||
arms[1].pats[0].node == PatWild(PatWildSingle) &&
|
||||
arms[1].pats[0].node == PatWild &&
|
||||
// we don't want any content in the second arm (unit or empty block)
|
||||
is_unit_expr(&arms[1].body) &&
|
||||
// finally, MATCH_BOOL doesn't apply here
|
||||
|
@ -252,7 +252,7 @@ impl LintPass for PatternPass {
|
||||
impl LateLintPass for PatternPass {
|
||||
fn check_pat(&mut self, cx: &LateContext, pat: &Pat) {
|
||||
if let PatIdent(_, ref ident, Some(ref right)) = pat.node {
|
||||
if right.node == PatWild(PatWildSingle) {
|
||||
if right.node == PatWild {
|
||||
cx.span_lint(REDUNDANT_PATTERN, pat.span, &format!(
|
||||
"the `{} @ _` pattern can be written as just `{}`",
|
||||
ident.node.name, ident.node.name));
|
||||
|
Loading…
Reference in New Issue
Block a user