summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-87964.rs
blob: 116686abb9e3d93d8fdeafc432cfbeefd1caaeda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// build-pass

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

pub trait Target {
    const LENGTH: usize;
}


pub struct Container<T: Target>
where
    [(); T::LENGTH]: Sized,
{
    _target: T,
}

impl<T: Target> Container<T>
where
    [(); T::LENGTH]: Sized,
{
    pub fn start(
        _target: T,
    ) -> Container<T> {
        Container { _target }
    }
}

fn main() {}