]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/pass/dst-irrefutable-bind.rs
Auto merge of #104915 - weihanglo:update-cargo, r=ehuss
[rust.git] / src / tools / miri / tests / pass / dst-irrefutable-bind.rs
1 struct Test<T: ?Sized>(T);
2
3 fn main() {
4     let x = Test([1, 2, 3]);
5     let x: &Test<[i32]> = &x;
6
7     let &ref _y = x;
8
9     // Make sure binding to a fat pointer behind a reference
10     // still works
11     let slice = &[1, 2, 3];
12     let x = Test(&slice);
13     let Test(&_slice) = x;
14 }