mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
19 lines
262 B
Rust
19 lines
262 B
Rust
//@ check-pass
|
|
#![feature(string_deref_patterns)]
|
|
|
|
fn foo(s: &String) -> i32 {
|
|
match *s {
|
|
"a" => 42,
|
|
_ => -1,
|
|
}
|
|
}
|
|
|
|
fn bar(s: Option<&&&&String>) -> i32 {
|
|
match s {
|
|
Some(&&&&"&&&&") => 1,
|
|
_ => -1,
|
|
}
|
|
}
|
|
|
|
fn main() {}
|