diff options
| author | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-07-08 22:37:12 +0200 |
|---|---|---|
| committer | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-07-08 22:37:12 +0200 |
| commit | 25eb3829e5661ab85067188ca9e6586c29aed6e9 (patch) | |
| tree | 3ccb9a062c06d5e90c134b08b76b32082518b0e6 /compiler/rustc_middle/src/traits | |
| parent | 49421d1fa382fba84792e5d5dd7721c1c3e0e46e (diff) | |
| download | rust-25eb3829e5661ab85067188ca9e6586c29aed6e9.tar.gz rust-25eb3829e5661ab85067188ca9e6586c29aed6e9.zip | |
Error on moving unsized values rather than ICE'ing
Diffstat (limited to 'compiler/rustc_middle/src/traits')
| -rw-r--r-- | compiler/rustc_middle/src/traits/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 1a5a9765ce7..5bdde3a514e 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -412,6 +412,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 store them in MIR locals as temporaries. + UnsizedNonPlaceExpr(Span), } /// Whether a value can be extracted into a const. |
