mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
26 lines
424 B
Rust
26 lines
424 B
Rust
//@ check-pass
|
|
// From https://github.com/rust-lang/rust/issues/78549
|
|
|
|
fn main() {
|
|
match "foo" {
|
|
"foo" => {},
|
|
&_ => {},
|
|
}
|
|
|
|
match "foo" {
|
|
&_ => {},
|
|
"foo" => {},
|
|
}
|
|
|
|
match ("foo", 0, "bar") {
|
|
(&_, 0, &_) => {},
|
|
("foo", _, "bar") => {},
|
|
(&_, _, &_) => {},
|
|
}
|
|
|
|
match (&"foo", "bar") {
|
|
(&"foo", &_) => {},
|
|
(&&_, &_) => {},
|
|
}
|
|
}
|