-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Note where implicit Sized requirement comes from #27964
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.T-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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I was not aware that
Sizedis a default requirement for type parameters, so I was very confused why this code doesn't compile:I couldn't understand why compiler insists on having
Sizedfor the innermost type, ifBoxdoesn't care and makes the boxed type sized.The current explanation for E0277 doesn't cover this case specifically, and it doesn't mention the unusual
?Sizedsyntax. It'd help me if, for example, the hint:made implied defaults explicitly spelled out:
and/or hinted how to fix it: