1
Fork 0

Require a box expression's type to be Sized

This commit is contained in:
Anton Golov 2021-08-20 16:25:52 +02:00
parent ba83b39d4e
commit b8fff95961
4 changed files with 7 additions and 3 deletions

View file

@ -1893,9 +1893,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
// While this is located in `nll::typeck` this error is not
// an NLL error, it's a required check to prevent creation
// of unsized rvalues in certain cases:
// * operand of a box expression
// * callee in a call expression
// of unsized rvalues in a call expression.
diag.emit();
}
}