]> git.lizzy.rs Git - rust.git/blob - src/test/ui/autoref-autoderef/deref-into-array.rs
Auto merge of #102684 - JhonnyBillM:delete-target-data-layout-errors-wrapper, r=davidtwco
[rust.git] / src / test / ui / autoref-autoderef / deref-into-array.rs
1 // check-pass
2
3 struct Test<T>([T; 1]);
4
5 impl<T> std::ops::Deref for Test<T> {
6     type Target = [T; 1];
7
8     fn deref(&self) -> &[T; 1] {
9         &self.0
10     }
11 }
12
13 fn main() {
14     let out = Test([(); 1]);
15     let blah = out.len();
16     println!("{}", blah);
17 }