]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / issue-78549-ref-pat-and-str.rs
1 // check-pass
2 // From https://github.com/rust-lang/rust/issues/78549
3
4 fn main() {
5 match "foo" {
6 "foo" => {},
7 &_ => {},
8 }
9
10 match "foo" {
11 &_ => {},
12 "foo" => {},
13 }
14
15 match ("foo", 0, "bar") {
16 (&_, 0, &_) => {},
17 ("foo", _, "bar") => {},
18 (&_, _, &_) => {},
19 }
20
21 match (&"foo", "bar") {
22 (&"foo", &_) => {},
23 (&&_, &_) => {},
24 }
25 }