rust/tests/crashes/119729.rs
2024-04-14 11:21:51 +02:00

13 lines
245 B
Rust

//@ known-bug: #119729
#![feature(generic_const_exprs)]
trait Size<const N: usize> {}
impl<T: Sized> Size<{ std::mem::size_of::<T>() }> for T {}
struct A<T: Size<8> + ?Sized> {
x: std::marker::PhantomData<T>,
}
fn foo(x: A<dyn Send>) {}