Require a box expression's type to be Sized
This commit is contained in:
parent
ba83b39d4e
commit
b8fff95961
4 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue