Auto merge of #116081 - compiler-errors:closure-captures-sized, r=cjgillot
Check that closure/generator's interior/capture types are sized check that closure upvars and generator interiors are sized. this check is only necessary when `unsized_fn_params` or `unsized_locals` is enabled, so only check if those are active. Fixes #93622 Fixes #61335 Fixes #68543
This commit is contained in:
@@ -299,6 +299,10 @@ pub enum ObligationCauseCode<'tcx> {
|
||||
SizedYieldType,
|
||||
/// Inline asm operand type must be `Sized`.
|
||||
InlineAsmSized,
|
||||
/// Captured closure type must be `Sized`.
|
||||
SizedClosureCapture(LocalDefId),
|
||||
/// Types live across generator yields must be `Sized`.
|
||||
SizedGeneratorInterior(LocalDefId),
|
||||
/// `[expr; N]` requires `type_of(expr): Copy`.
|
||||
RepeatElementCopy {
|
||||
/// If element is a `const fn` we display a help message suggesting to move the
|
||||
|
||||
Reference in New Issue
Block a user