2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-10-26 22:35:26 +01:00
|
|
|
const X: &'static str = "12345";
|
|
|
|
|
|
|
|
|
|
fn test(s: String) -> bool {
|
2015-02-01 21:53:25 -05:00
|
|
|
match &*s {
|
2014-10-26 22:35:26 +01:00
|
|
|
X => true,
|
|
|
|
|
_ => false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
assert!(test("12345".to_string()));
|
|
|
|
|
}
|