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