1 // rust-lang/rust#58158: We have special-case code to deal with case
2 // when a type is both packed and needs drop glue, (we move the fields
3 // out of their potentially unaligned locations before dropping them,
4 // which requires they be Sized; see PR #44884).
6 // So, we need to check if a given type needs drop-glue. That requires
7 // that we actually know that the concrete type, and we guard against
8 // the type having unknown parts (i.e. type variables) by ICE'ing in
11 // But in a case where we have a projection (`Type as Trait::Assoc`)
12 // where `Type` does not actually implement `Trait`, we of course
13 // cannot have a concrete type, because there is no impl to look up
14 // the concrete type for the associated type `Assoc`.
16 // So, this test is just making sure that in such a case that we do
17 // not immediately ICE, and instead allow the underlying type error to
20 pub struct Matrix
<S
>(S
);
21 pub struct DefaultAllocator
;
23 pub trait Allocator { type Buffer; }
25 // impl Allocator for DefaultAllocator { type Buffer = (); }
28 struct Foo(Matrix
<<DefaultAllocator
as Allocator
>::Buffer
>);
29 //~^ ERROR the trait bound `DefaultAllocator: Allocator` is not satisfied