blob: fe7335c0c65647a61783aeeff92cb46a870a9c20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
struct Test<T: ?Sized>(T);
fn main() {
let x = Test([1, 2, 3]);
let x: &Test<[i32]> = &x;
let &ref _y = x;
// Make sure binding to a fat pointer behind a reference
// still works
let slice = &[1, 2, 3];
let x = Test(&slice);
let Test(&_slice) = x;
}
|