diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-18352.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-18352.rs b/src/test/ui/issues/issue-18352.rs new file mode 100644 index 000000000..5d93ed064 --- /dev/null +++ b/src/test/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())); +} |