rust/src/test/ui/issues/issue-18352.rs
2019-07-27 18:56:16 +03:00

15 lines
193 B
Rust

// run-pass
const X: &'static str = "12345";
fn test(s: String) -> bool {
match &*s {
X => true,
_ => false
}
}
fn main() {
assert!(test("12345".to_string()));
}