mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
13 lines
245 B
Rust
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>) {}
|