mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
193 B
Rust
14 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()));
|
|
}
|