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:
commit
8ad56c8fb7
@ -37,4 +37,13 @@ fn should_not_lint() {
|
||||
Some(_) => (),
|
||||
_ => (),
|
||||
}
|
||||
|
||||
const FOO: &str = "foo";
|
||||
|
||||
fn foo(s: &str) -> i32 {
|
||||
match s {
|
||||
FOO => 1,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user