mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
20 lines
287 B
Rust
20 lines
287 B
Rust
//@ check-pass
|
|
#![feature(deref_patterns)]
|
|
#![expect(incomplete_features)]
|
|
|
|
fn foo(s: &String) -> i32 {
|
|
match *s {
|
|
"a" => 42,
|
|
_ => -1,
|
|
}
|
|
}
|
|
|
|
fn bar(s: Option<&&&&String>) -> i32 {
|
|
match s {
|
|
Some(&&&&"&&&&") => 1,
|
|
_ => -1,
|
|
}
|
|
}
|
|
|
|
fn main() {}
|