From 13180c25212eed7f74fef17880a23a77f3fb2498 Mon Sep 17 00:00:00 2001 From: mejrs <59372212+mejrs@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:58:46 +0200 Subject: [PATCH 1/3] Remove support for dynamic allocas --- compiler/rustc_codegen_gcc/src/builder.rs | 4 -- compiler/rustc_codegen_llvm/src/builder.rs | 10 ----- compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 6 --- compiler/rustc_codegen_ssa/src/mir/mod.rs | 6 +-- compiler/rustc_codegen_ssa/src/mir/operand.rs | 40 +------------------ compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 21 ---------- .../rustc_codegen_ssa/src/mir/statement.rs | 7 +++- .../rustc_codegen_ssa/src/traits/builder.rs | 1 - library/core/src/mem/mod.rs | 2 +- 9 files changed, 11 insertions(+), 86 deletions(-) diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index a2e34d1f8fbc7..372e8db73b5e6 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -931,10 +931,6 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { .get_address(self.location) } - fn dynamic_alloca(&mut self, _len: RValue<'gcc>, _align: Align) -> RValue<'gcc> { - unimplemented!(); - } - fn load(&mut self, pointee_ty: Type<'gcc>, ptr: RValue<'gcc>, align: Align) -> RValue<'gcc> { let block = self.llbb(); let function = block.get_function(); diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 5e9594dd06bb7..59140410e5421 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -538,16 +538,6 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { } } - fn dynamic_alloca(&mut self, size: &'ll Value, align: Align) -> &'ll Value { - unsafe { - let alloca = - llvm::LLVMBuildArrayAlloca(self.llbuilder, self.cx().type_i8(), size, UNNAMED); - llvm::LLVMSetAlignment(alloca, align.bytes() as c_uint); - // Cast to default addrspace if necessary - llvm::LLVMBuildPointerCast(self.llbuilder, alloca, self.cx().type_ptr(), UNNAMED) - } - } - fn load(&mut self, ty: &'ll Type, ptr: &'ll Value, align: Align) -> &'ll Value { unsafe { let load = llvm::LLVMBuildLoad2(self.llbuilder, ty, ptr, UNNAMED); diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 91ada856d5977..00a6ec7dfbaee 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1492,12 +1492,6 @@ unsafe extern "C" { Ty: &'a Type, Name: *const c_char, ) -> &'a Value; - pub(crate) fn LLVMBuildArrayAlloca<'a>( - B: &Builder<'a>, - Ty: &'a Type, - Val: &'a Value, - Name: *const c_char, - ) -> &'a Value; pub(crate) fn LLVMBuildLoad2<'a>( B: &Builder<'a>, Ty: &'a Type, diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index 66c4af4c935b5..fa0675f4b988a 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -140,8 +140,8 @@ enum LocalRef<'tcx, V> { Place(PlaceRef<'tcx, V>), /// `UnsizedPlace(p)`: `p` itself is a thin pointer (indirect place). /// `*p` is the wide pointer that references the actual unsized place. - /// Every time it is initialized, we have to reallocate the place - /// and update the wide pointer. That's the reason why it is indirect. + /// + /// Rust has no alloca and thus no ability to move the unsized place. UnsizedPlace(PlaceRef<'tcx, V>), /// The backend [`OperandValue`] has already been generated. Operand(OperandRef<'tcx, V>), @@ -498,7 +498,7 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( LocalRef::Place(PlaceRef::new_sized(llarg, arg.layout)) } } - // Unsized indirect qrguments + // Unsized indirect arguments PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } => { // As the storage for the indirect argument lives during // the whole function call, we just copy the wide pointer. diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs index 99957c6770845..6d2b8cf9e7c1d 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -15,9 +15,9 @@ use tracing::{debug, instrument}; use super::place::{PlaceRef, PlaceValue}; use super::rvalue::transmute_immediate; use super::{FunctionCx, LocalRef}; +use crate::MemFlags; use crate::common::IntPredicate; use crate::traits::*; -use crate::{MemFlags, size_of_val}; /// The representation of a Rust value. The enum variant is in fact /// uniquely determined by the value's type, but is kept as a @@ -771,44 +771,6 @@ impl<'a, 'tcx, V: CodegenObject> OperandValue { } } } - - pub fn store_unsized>( - self, - bx: &mut Bx, - indirect_dest: PlaceRef<'tcx, V>, - ) { - debug!("OperandRef::store_unsized: operand={:?}, indirect_dest={:?}", self, indirect_dest); - // `indirect_dest` must have `*mut T` type. We extract `T` out of it. - let unsized_ty = indirect_dest - .layout - .ty - .builtin_deref(true) - .unwrap_or_else(|| bug!("indirect_dest has non-pointer type: {:?}", indirect_dest)); - - let OperandValue::Ref(PlaceValue { llval: llptr, llextra: Some(llextra), .. }) = self - else { - bug!("store_unsized called with a sized value (or with an extern type)") - }; - - // Allocate an appropriate region on the stack, and copy the value into it. Since alloca - // doesn't support dynamic alignment, we allocate an extra align - 1 bytes, and align the - // pointer manually. - let (size, align) = size_of_val::size_and_align_of_dst(bx, unsized_ty, Some(llextra)); - let one = bx.const_usize(1); - let align_minus_1 = bx.sub(align, one); - let size_extra = bx.add(size, align_minus_1); - let min_align = Align::ONE; - let alloca = bx.dynamic_alloca(size_extra, min_align); - let address = bx.ptrtoint(alloca, bx.type_isize()); - let neg_address = bx.neg(address); - let offset = bx.and(neg_address, align_minus_1); - let dst = bx.inbounds_ptradd(alloca, offset); - bx.memcpy(dst, min_align, llptr, min_align, size, MemFlags::empty()); - - // Store the allocated region and the extra to the indirect place. - let indirect_operand = OperandValue::Pair(dst, llextra); - indirect_operand.store(bx, indirect_dest); - } } impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index e1d8b7546cf42..138e705c678fc 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -364,27 +364,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { Some(imm) } - pub(crate) fn codegen_rvalue_unsized( - &mut self, - bx: &mut Bx, - indirect_dest: PlaceRef<'tcx, Bx::Value>, - rvalue: &mir::Rvalue<'tcx>, - ) { - debug!( - "codegen_rvalue_unsized(indirect_dest.llval={:?}, rvalue={:?})", - indirect_dest.val.llval, rvalue - ); - - match *rvalue { - mir::Rvalue::Use(ref operand) => { - let cg_operand = self.codegen_operand(bx, operand); - cg_operand.val.store_unsized(bx, indirect_dest); - } - - _ => bug!("unsized assignment other than `Rvalue::Use`"), - } - } - pub(crate) fn codegen_rvalue_operand( &mut self, bx: &mut Bx, diff --git a/compiler/rustc_codegen_ssa/src/mir/statement.rs b/compiler/rustc_codegen_ssa/src/mir/statement.rs index cd55a838a7561..f164e0f912373 100644 --- a/compiler/rustc_codegen_ssa/src/mir/statement.rs +++ b/compiler/rustc_codegen_ssa/src/mir/statement.rs @@ -15,7 +15,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { match self.locals[index] { LocalRef::Place(cg_dest) => self.codegen_rvalue(bx, cg_dest, rvalue), LocalRef::UnsizedPlace(cg_indirect_dest) => { - self.codegen_rvalue_unsized(bx, cg_indirect_dest, rvalue) + let ty = cg_indirect_dest.layout.ty; + span_bug!( + statement.source_info.span, + "cannot reallocate from `UnsizedPlace({ty})` \ + into `{rvalue:?}`; dynamic alloca is not supported", + ); } LocalRef::PendingOperand => { let operand = self.codegen_rvalue_operand(bx, rvalue); diff --git a/compiler/rustc_codegen_ssa/src/traits/builder.rs b/compiler/rustc_codegen_ssa/src/traits/builder.rs index f35f551d5906a..1c451c9353494 100644 --- a/compiler/rustc_codegen_ssa/src/traits/builder.rs +++ b/compiler/rustc_codegen_ssa/src/traits/builder.rs @@ -224,7 +224,6 @@ pub trait BuilderMethods<'a, 'tcx>: fn to_immediate_scalar(&mut self, val: Self::Value, scalar: Scalar) -> Self::Value; fn alloca(&mut self, size: Size, align: Align) -> Self::Value; - fn dynamic_alloca(&mut self, size: Self::Value, align: Align) -> Self::Value; fn load(&mut self, ty: Self::Type, ptr: Self::Value, align: Align) -> Self::Value; fn volatile_load(&mut self, ty: Self::Type, ptr: Self::Value) -> Self::Value; diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index b93f854b9dc43..d8ee38b5d0b2d 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -151,7 +151,7 @@ pub const fn forget(t: T) { /// /// While Rust does not permit unsized locals since its removal in [#111942] it is /// still possible to call functions with unsized values from a function argument -/// or in-place construction. +/// or place expression. /// /// ```rust /// #![feature(unsized_fn_params, forget_unsized)] From c62e18fb74ab97b1495f6b50796444b61ab74e04 Mon Sep 17 00:00:00 2001 From: mejrs <59372212+mejrs@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:16:42 +0200 Subject: [PATCH 2/3] Error on moving unsized values rather than ICE'ing --- .../rustc_hir_typeck/src/fn_ctxt/checks.rs | 20 ++++- compiler/rustc_middle/src/traits/mod.rs | 4 + .../src/error_reporting/traits/suggestions.rs | 6 ++ .../ui/unsized-locals/unsized-exprs-rpass.rs | 5 -- tests/ui/unsized-locals/unsized-exprs.stderr | 12 ++- .../unsized-locals/unsized-non-place-exprs.rs | 27 +++++++ .../unsized-non-place-exprs.stderr | 81 +++++++++++++++++++ 7 files changed, 147 insertions(+), 8 deletions(-) create mode 100644 tests/ui/unsized-locals/unsized-non-place-exprs.rs create mode 100644 tests/ui/unsized-locals/unsized-non-place-exprs.stderr diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs index 95c7f251c884c..a806d782b49c8 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs @@ -242,6 +242,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { arg_expr.span, ObligationCauseCode::WellFormed(None), ); + + // Unsized function arguments must be place expressions, because we can't move them. + self.check_place_expr_if_unsized(fn_input_ty, arg_expr); } // First, let's unify the formal method signature with the expectation eagerly. @@ -544,6 +547,20 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } + /// If `unsized_fn_params` is active, check that unsized values are place + /// expressions. This is needed because we can't move unsized values. + /// + /// If `unsized_fn_params` is inactive, this will be checked in borrowck instead. + fn check_place_expr_if_unsized(&self, ty: Ty<'tcx>, expr: &'tcx hir::Expr<'tcx>) { + if self.tcx.features().unsized_fn_params() && !expr.is_syntactic_place_expr() { + self.require_type_is_sized( + ty, + expr.span, + ObligationCauseCode::UnsizedNonPlaceExpr(expr.span), + ); + } + } + fn report_arg_errors( &self, compatibility_diagonal: IndexVec>, @@ -1870,7 +1887,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { }); } hir::StmtKind::Semi(expr) => { - self.check_expr(expr); + let ty = self.check_expr(expr); + self.check_place_expr_if_unsized(ty, expr); } } diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 27079af06fcd3..ee3bfd8b241aa 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -406,6 +406,10 @@ pub enum ObligationCauseCode<'tcx> { /// Obligations emitted during the normalization of a free type alias. TypeAlias(ObligationCauseCodeHandle<'tcx>, Span, DefId), + + /// Only reachable if the `unsized_fn_params` feature is used. Unsized function arguments must + /// be place expressions, because we can't move them. + UnsizedNonPlaceExpr(Span), } /// Whether a value can be extracted into a const. diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 6d07ae021ae9d..5de3c331ecd21 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -3607,6 +3607,12 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { ); suggest_remove_deref(err, &expr); } + ObligationCauseCode::UnsizedNonPlaceExpr(span) => { + err.span_note( + span, + "unsized values must be place expressions and cannot be moved from", + ); + } } } diff --git a/tests/ui/unsized-locals/unsized-exprs-rpass.rs b/tests/ui/unsized-locals/unsized-exprs-rpass.rs index 54ecd00034365..ce31bd63f7cc1 100644 --- a/tests/ui/unsized-locals/unsized-exprs-rpass.rs +++ b/tests/ui/unsized-locals/unsized-exprs-rpass.rs @@ -18,11 +18,6 @@ impl std::ops::Add for A<[u8]> { } fn main() { - udrop::<[u8]>(loop { - break *foo(); - }); - udrop::<[u8]>(if true { *foo() } else { *foo() }); - udrop::<[u8]>({ *foo() }); udrop::<[u8]>((*foo())); *afoo() + 42; udrop as fn([u8]); diff --git a/tests/ui/unsized-locals/unsized-exprs.stderr b/tests/ui/unsized-locals/unsized-exprs.stderr index 1b61254870f67..5b70a2f239894 100644 --- a/tests/ui/unsized-locals/unsized-exprs.stderr +++ b/tests/ui/unsized-locals/unsized-exprs.stderr @@ -10,7 +10,11 @@ note: required because it appears within the type `A<[u8]>` | LL | struct A(X); | ^ - = note: structs must have a statically known size to be initialized +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-exprs.rs:19:22 + | +LL | udrop::>(A { 0: *foo() }); + | ^^^^^^^^^^^^^^^ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/unsized-exprs.rs:21:22 @@ -24,7 +28,11 @@ note: required because it appears within the type `A<[u8]>` | LL | struct A(X); | ^ - = note: the return type of a function must have a statically known size +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-exprs.rs:21:22 + | +LL | udrop::>(A(*foo())); + | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/tests/ui/unsized-locals/unsized-non-place-exprs.rs b/tests/ui/unsized-locals/unsized-non-place-exprs.rs new file mode 100644 index 0000000000000..15c09a336dcd1 --- /dev/null +++ b/tests/ui/unsized-locals/unsized-non-place-exprs.rs @@ -0,0 +1,27 @@ +//! `#![feature(unsized_fn_params)]` lets you use unsized function parameters. In particular this +//! is load bearing for `Box: FnOnce()`. To do that, borrowck relaxes the requirement +//! that certain places must be `Sized`. But in #142911 we removed alloca support, so these +//! arguments can't move (or ICE at codegen) That means when `unsized_fn_params` is enabled, we must +//! explicitly check that unsized function arguments are place expressions. +//! +//! Also see tests/ui/unsized_locals/unsized-exprs-rpass.rs + +#![feature(unsized_fn_params)] + +fn foo() -> Box<[u8]> { + Box::new(*b"foo") +} + +fn udrop(_x: T) {} + +fn main(){ + // NB The ordering of the following operations matters, otherwise errors get swallowed somehow. + + udrop::<[u8]>(if true { *foo() } else { *foo() }); //~ERROR the size for values of type `[u8]` cannot be known at compilation time + udrop::<[u8]>({ *foo() }); //~ERROR the size for values of type `[u8]` cannot be known at compilation time + udrop(match foo() { x => *x }); //~ERROR the size for values of type `[u8]` cannot be known at compilation time + udrop::<[u8]>({ loop { break *foo(); } }); //~ERROR the size for values of type `[u8]` cannot be known at compilation time + + { *foo() }; //~ERROR the size for values of type `[u8]` cannot be known at compilation time + { loop { break *foo(); } }; //~ERROR the size for values of type `[u8]` cannot be known at compilation time +} diff --git a/tests/ui/unsized-locals/unsized-non-place-exprs.stderr b/tests/ui/unsized-locals/unsized-non-place-exprs.stderr new file mode 100644 index 0000000000000..1a05f97a449fe --- /dev/null +++ b/tests/ui/unsized-locals/unsized-non-place-exprs.stderr @@ -0,0 +1,81 @@ +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:20:19 + | +LL | udrop::<[u8]>(if true { *foo() } else { *foo() }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:20:19 + | +LL | udrop::<[u8]>(if true { *foo() } else { *foo() }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:21:19 + | +LL | udrop::<[u8]>({ *foo() }); + | ^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:21:19 + | +LL | udrop::<[u8]>({ *foo() }); + | ^^^^^^^^^^ + +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:22:11 + | +LL | udrop(match foo() { x => *x }); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:22:11 + | +LL | udrop(match foo() { x => *x }); + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:23:19 + | +LL | udrop::<[u8]>({ loop { break *foo(); } }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:23:19 + | +LL | udrop::<[u8]>({ loop { break *foo(); } }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:25:5 + | +LL | { *foo() }; + | ^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:25:5 + | +LL | { *foo() }; + | ^^^^^^^^^^ + +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time + --> $DIR/unsized-non-place-exprs.rs:26:5 + | +LL | { loop { break *foo(); } }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[u8]` +note: unsized values must be place expressions and cannot be moved from + --> $DIR/unsized-non-place-exprs.rs:26:5 + | +LL | { loop { break *foo(); } }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0277`. From 75fd66034757138082af2835f75b3d9bf25f7f67 Mon Sep 17 00:00:00 2001 From: mejrs <59372212+mejrs@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:22:59 +0200 Subject: [PATCH 3/3] UnsizedPlace fixme --- compiler/rustc_codegen_ssa/src/mir/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index fa0675f4b988a..6b552d8bf9364 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -142,6 +142,9 @@ enum LocalRef<'tcx, V> { /// `*p` is the wide pointer that references the actual unsized place. /// /// Rust has no alloca and thus no ability to move the unsized place. + /// + /// FIXME: Since unsized locals are gutted, 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>),