diff options
| author | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-06-13 01:16:36 +0200 |
|---|---|---|
| committer | mejrs <59372212+mejrs@users.noreply.github.com> | 2025-06-13 01:16:36 +0200 |
| commit | c0e02e26b39913ec1ee31621c65784542b137310 (patch) | |
| tree | 840c5d2d5150ad40a5cf4cceff87164f3e24b8d4 /compiler/rustc_middle/src | |
| parent | 6c8138de8f1c96b2f66adbbc0e37c73525444750 (diff) | |
| download | rust-c0e02e26b39913ec1ee31621c65784542b137310.tar.gz rust-c0e02e26b39913ec1ee31621c65784542b137310.zip | |
Unimplement unsized_locals
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/instance.rs | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index f2f975a6968..56f19d7929d 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -1133,13 +1133,6 @@ pub type AssertMessage<'tcx> = AssertKind<Operand<'tcx>>; /// Each local naturally corresponds to the place `Place { local, projection: [] }`. This place has /// the address of the local's allocation and the type of the local. /// -/// **Needs clarification:** Unsized locals seem to present a bit of an issue. Their allocation -/// can't actually be created on `StorageLive`, because it's unclear how big to make the allocation. -/// Furthermore, MIR produces assignments to unsized locals, although that is not permitted under -/// `#![feature(unsized_locals)]` in Rust. Besides just putting "unsized locals are special and -/// different" in a bunch of places, I (JakobDegen) don't know how to incorporate this behavior into -/// the current MIR semantics in a clean way - possibly this needs some design work first. -/// /// For places that are not locals, ie they have a non-empty list of projections, we define the /// values as a function of the parent place, that is the place with its last [`ProjectionElem`] /// stripped. The way this is computed of course depends on the kind of that last projection diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs index 5ba4e5446e9..68adfb3cdb3 100644 --- a/compiler/rustc_middle/src/ty/instance.rs +++ b/compiler/rustc_middle/src/ty/instance.rs @@ -79,7 +79,7 @@ pub enum InstanceKind<'tcx> { Intrinsic(DefId), /// `<T as Trait>::method` where `method` receives unsizeable `self: Self` (part of the - /// `unsized_locals` feature). + /// `unsized_fn_params` feature). /// /// The generated shim will take `Self` via `*mut Self` - conceptually this is `&owned Self` - /// and dereference the argument to call the original function. |
