summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/issue-11940.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/match/issue-11940.rs')
-rw-r--r--src/test/ui/match/issue-11940.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/match/issue-11940.rs b/src/test/ui/match/issue-11940.rs
new file mode 100644
index 000000000..6815c87ed
--- /dev/null
+++ b/src/test/ui/match/issue-11940.rs
@@ -0,0 +1,11 @@
+// run-pass
+
+const TEST_STR: &'static str = "abcd";
+
+fn main() {
+ let s = "abcd";
+ match s {
+ TEST_STR => (),
+ _ => unreachable!()
+ }
+}