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