summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.rs
blob: 286ec2d24508416b73b5c82b873496f4c48104c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
struct Bar<T>(T);

trait Baz {
    fn hey();
}

impl Baz for u16 {
    fn hey() {
        let _: [u8; std::mem::size_of::<Self>()]; // ok
    }
}

impl<T> Baz for Bar<T> {
    fn hey() {
        let _: [u8; std::mem::size_of::<Self>()]; //~ERROR generic `Self`
    }
}

fn main() {}