]> git.proxmox.com Git - rustc.git/blob - tests/ui/autoref-autoderef/deref-into-array.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }