Auto merge of #8049 - surechen:fixes_7946, r=flip1995

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:
bors 2021-12-01 09:58:54 +00:00
commit 8ad56c8fb7

View File

@ -37,4 +37,13 @@ fn should_not_lint() {
Some(_) => (),
_ => (),
}
const FOO: &str = "foo";
fn foo(s: &str) -> i32 {
match s {
FOO => 1,
_ => 0,
}
}
}