1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// 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() {}