rust/src/test/run-pass/binding/match-ref-unsized.rs
2018-12-25 21:08:33 -07:00

11 lines
206 B
Rust

// 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") }
}
}