blob: 02dff02430989885df6c4e0980da0a2c95043e11 [file]
//! Regression test for https://github.com/rust-lang/rust/issues/118278
//@ check-pass
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
pub trait Foo {
const SIZE: usize;
}
impl Foo for u64 {
const SIZE: usize = 8;
}
pub struct Wrapper<T>
where
T: Foo,
[(); T::SIZE]:,
{
pub t: T,
}
pub fn bar() -> Wrapper<impl Foo> {
Wrapper { t: 10 }
}
fn main() {}