rust/tests/ui/deref-patterns/refs.rs
2023-01-11 09:32:08 +00:00

19 lines
261 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() {}