]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const_evaluatable/associated-const.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const_evaluatable / associated-const.rs
1 // check-pass
2 struct Foo<T>(T);
3 impl<T> Foo<T> {
4 const VALUE: usize = std::mem::size_of::<T>();
5 }
6
7 fn test<T>() {
8 let _ = [0; Foo::<u8>::VALUE];
9 }
10
11 fn main() {}