]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/min_const_generics/self-ty-in-const-2.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const-generics / min_const_generics / self-ty-in-const-2.rs
1 #![feature(min_const_generics)]
2
3 struct Bar<T>(T);
4
5 trait Baz {
6 fn hey();
7 }
8
9 impl Baz for u16 {
10 fn hey() {
11 let _: [u8; std::mem::size_of::<Self>()]; // ok
12 }
13 }
14
15 impl<T> Baz for Bar<T> {
16 fn hey() {
17 let _: [u8; std::mem::size_of::<Self>()]; //~ERROR generic `Self`
18 }
19 }
20
21 fn main() {}