]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-67739.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / const-generics / issues / issue-67739.rs
1 // Regression test for #67739
2
3 #![allow(incomplete_features)]
4 #![feature(const_generics)]
5
6 use std::mem;
7
8 pub trait Trait {
9     type Associated: Sized;
10
11     fn associated_size(&self) -> usize {
12         [0u8; mem::size_of::<Self::Associated>()];
13         //~^ ERROR: array lengths can't depend on generic parameters
14         0
15     }
16 }
17
18 fn main() {}