diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-03 08:00:47 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-18 13:09:34 +0000 |
| commit | c65d3ce365ecb6d6f36b413edb591d4746f52305 (patch) | |
| tree | 218949807532feb05dd75775d72185c4c7620f4b /compiler/rustc_mir_transform | |
| parent | 6c0a912e5a45904cf537f34876b16ae71d899f86 (diff) | |
| download | rust-c65d3ce365ecb6d6f36b413edb591d4746f52305.tar.gz rust-c65d3ce365ecb6d6f36b413edb591d4746f52305.zip | |
Generalize `unsize` and `unsize_into` destinations
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/gvn.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/gvn.rs b/compiler/rustc_mir_transform/src/gvn.rs index 07717b7c069..6657f89ceb5 100644 --- a/compiler/rustc_mir_transform/src/gvn.rs +++ b/compiler/rustc_mir_transform/src/gvn.rs @@ -579,7 +579,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> { CastKind::PointerCoercion(ty::adjustment::PointerCoercion::Unsize, _) => { let src = self.evaluated[value].as_ref()?; let dest = self.ecx.allocate(ty, MemoryKind::Stack).discard_err()?; - self.ecx.unsize_into(src, ty, &dest.clone().into()).discard_err()?; + self.ecx.unsize_into(src, ty, &dest).discard_err()?; self.ecx .alloc_mark_immutable(dest.ptr().provenance.unwrap().alloc_id()) .discard_err()?; |
