Error on moving unsized values rather than ICE'ing
This commit is contained in:
@@ -141,7 +141,12 @@ enum LocalRef<'tcx, V> {
|
||||
/// `UnsizedPlace(p)`: `p` itself is a thin pointer (indirect place).
|
||||
/// `*p` is the wide pointer that references the actual unsized place.
|
||||
///
|
||||
/// Rust has no alloca and thus no ability to move the unsized place.
|
||||
/// MIR only supports unsized args, not dynamically-sized locals, so
|
||||
/// new unsized temps don't exist and we must reuse the referred-to place.
|
||||
///
|
||||
/// FIXME: Since the removal of unsized locals in <https://github.com/rust-lang/rust/pull/142911>,
|
||||
/// can we maybe use `Place` here? Or refactor it in another way? There are quite a few
|
||||
/// `UnsizedPlace => bug` branches now.
|
||||
UnsizedPlace(PlaceRef<'tcx, V>),
|
||||
/// The backend [`OperandValue`] has already been generated.
|
||||
Operand(OperandRef<'tcx, V>),
|
||||
|
||||
Reference in New Issue
Block a user