mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
15 lines
194 B
Rust
15 lines
194 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()));
|
|
}
|