diff --git a/tests/ui/pattern_type_mismatch/mutability.rs b/tests/ui/pattern_type_mismatch/mutability.rs index 9b4f2f1f579..55a8c26215e 100644 --- a/tests/ui/pattern_type_mismatch/mutability.rs +++ b/tests/ui/pattern_type_mismatch/mutability.rs @@ -37,4 +37,13 @@ fn should_not_lint() { Some(_) => (), _ => (), } + + const FOO: &str = "foo"; + + fn foo(s: &str) -> i32 { + match s { + FOO => 1, + _ => 0, + } + } }