rust/tests/ui/const-generics/issues/issue-87964.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
394 B
Rust
Raw Normal View History

2021-10-18 11:25:45 -05:00
// 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() {}