Add test for pattern_type_mismatch.
This issue has been fixed by [commit](8c1c763c2d
)
This PR is used for close #7946(Fixes #7946).
changelog: Add test for pattern_type_mismatch.
This commit is contained in:
parent
5fbfdfa319
commit
bd63686e0f
@ -37,4 +37,13 @@ fn should_not_lint() {
|
|||||||
Some(_) => (),
|
Some(_) => (),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FOO: &str = "foo";
|
||||||
|
|
||||||
|
fn foo(s: &str) -> i32 {
|
||||||
|
match s {
|
||||||
|
FOO => 1,
|
||||||
|
_ => 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user