mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
12 lines
207 B
Rust
12 lines
207 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") }
|
|
}
|
|
}
|