]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/generic_const_exprs/impl-bounds.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / const-generics / generic_const_exprs / impl-bounds.rs
CommitLineData
1b1a35ee 1// check-pass
94222f64 2#![feature(generic_const_exprs)]
1b1a35ee
XL
3#![allow(incomplete_features)]
4
5use std::mem::size_of;
6
7struct Foo<T, const N: usize>(T);
8
9impl<T> Foo<T, { size_of::<T>() }> {
10 fn test() {
11 let _: [u8; std::mem::size_of::<T>()];
12 }
13}
14
15trait Bar<const N: usize> {
16 fn test_me();
17}
18
19impl<T> Bar<{ size_of::<T>() }> for Foo<T, 3> {
20 fn test_me() {
21 let _: [u8; std::mem::size_of::<T>()];
22 }
23}
24
25fn main() {}