summaryrefslogtreecommitdiffstats
path: root/src/test/ui/autoref-autoderef/deref-into-array.rs
blob: 855a82d2f9c8f503226e37a7db5d7fdee90249e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// check-pass

struct Test<T>([T; 1]);

impl<T> std::ops::Deref for Test<T> {
    type Target = [T; 1];

    fn deref(&self) -> &[T; 1] {
        &self.0
    }
}

fn main() {
    let out = Test([(); 1]);
    let blah = out.len();
    println!("{}", blah);
}