-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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)
Metadata
Metadata
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.