]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-87964.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / const-generics / issues / issue-87964.rs
1 // build-pass
2
3 #![feature(generic_const_exprs)]
4 #![allow(incomplete_features)]
5
6 pub trait Target {
7     const LENGTH: usize;
8 }
9
10
11 pub struct Container<T: Target>
12 where
13     [(); T::LENGTH]: Sized,
14 {
15     _target: T,
16 }
17
18 impl<T: Target> Container<T>
19 where
20     [(); T::LENGTH]: Sized,
21 {
22     pub fn start(
23         _target: T,
24     ) -> Container<T> {
25         Container { _target }
26     }
27 }
28
29 fn main() {}