Check that closure's by-value captures are sized

This commit is contained in:
Michael Goulet
2023-09-23 00:26:26 +00:00
parent 2d08657901
commit c21867f9f6
6 changed files with 62 additions and 0 deletions

View File

@@ -299,6 +299,8 @@ pub enum ObligationCauseCode<'tcx> {
SizedYieldType,
/// Inline asm operand type must be `Sized`.
InlineAsmSized,
/// Captured closure type type must be `Sized`.
SizedClosureCapture(LocalDefId),
/// `[expr; N]` requires `type_of(expr): Copy`.
RepeatElementCopy {
/// If element is a `const fn` we display a help message suggesting to move the