summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-18352.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-18352.rs')
-rw-r--r--tests/ui/issues/issue-18352.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-18352.rs b/tests/ui/issues/issue-18352.rs
new file mode 100644
index 000000000..5d93ed064
--- /dev/null
+++ b/tests/ui/issues/issue-18352.rs
@@ -0,0 +1,14 @@
+// run-pass
+
+const X: &'static str = "12345";
+
+fn test(s: String) -> bool {
+ match &*s {
+ X => true,
+ _ => false
+ }
+}
+
+fn main() {
+ assert!(test("12345".to_string()));
+}