-
Notifications
You must be signed in to change notification settings - Fork 32
/
issue-78549-ref-pat-and-str.rs
55 lines (50 loc) · 1.07 KB
/
issue-78549-ref-pat-and-str.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//@ 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", &_) => {},
(&&_, &_) => {},
}
}
// ferrocene-annotations: fls_e5td0fa92fay
// Match Expressions
//
// ferrocene-annotations: fls_boyhlu5srp6u
// String Literals
//
// ferrocene-annotations: fls_hucd52suu6it
// Simple String Literals
//
// ferrocene-annotations: fls_d2sc9hl3v0mk
// Reference Patterns
//
// ferrocene-annotations: fls_org6hqv397fp
// Reference Pattern Matching
//
// ferrocene-annotations: fls_urbr5rg9206v
// Tuple Patterns
//
// ferrocene-annotations: fls_rce8bb7nz2jy
// Tuple Pattern Matching
//
// ferrocene-annotations: fls_k64tfywtn0g8
// Tuple Expressions
//
// ferrocene-annotations: fls_qztk0bkju9u
// Borrow Expression
//
// ferrocene-annotations: fls_a14slch83hzn
// Borrowing