Closed
Description
The following code compiles:
struct B<P: Sized = [Self]>(P);
but shouldn't, because [Self]
is NOT Sized.
If we change [Self]
with a [u8]
, like this:
struct B<P: Sized = [u8]>(P);
it fails to compile, because [u8]
isnt sized.
Also note that if we would write impl B {}
in the case of P being of default type [Self]
, we get an ICE:
Related to #59956 (comment)