]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-unsized.rs
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27
[rust.git] / src / test / ui / binding / match-ref-unsized.rs
1 // run-pass
2 // Binding unsized expressions to ref patterns
3
4 pub fn main() {
5     let ref a = *"abcdef";
6     assert_eq!(a, "abcdef");
7
8     match *"12345" {
9         ref b => { assert_eq!(b, "12345") }
10     }
11 }