about summary refs log tree commit diff
path: root/tests/ui/binding/match-ref-unsized.rs
blob: 204308dc9ec95f19ca144be0e036010be2920b25 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-pass
// Binding unsized expressions to ref patterns

pub fn main() {
    let ref a = *"abcdef";
    assert_eq!(a, "abcdef");

    match *"12345" {
        ref b => { assert_eq!(b, "12345") }
    }
}