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