2024-03-29 18:21:25 -05:00
|
|
|
//@ known-bug: #115435
|
2024-03-29 18:41:57 -05:00
|
|
|
//@ edition:2021
|
|
|
|
//@ compile-flags: -Copt-level=0
|
2024-03-29 18:21:25 -05:00
|
|
|
trait MyTrait {
|
|
|
|
type Target: ?Sized;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<A: ?Sized> MyTrait for A {
|
|
|
|
type Target = A;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
bug_run::<dyn MyTrait<Target = u8>>();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bug_run<T: ?Sized>()
|
|
|
|
where
|
|
|
|
<T as MyTrait>::Target: Sized,
|
|
|
|
{
|
|
|
|
bug::<T>();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bug<T>() {
|
|
|
|
std::mem::size_of::<T>();
|
|
|
|
}
|