diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-29 13:55:28 +0000 | 
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-04-29 14:03:06 +0000 | 
| commit | 820fce61e72a1bc9c8eb132afec9ab71c67f4923 (patch) | |
| tree | dbd8dc3f1a9bb34cb4e36d0b0df5bc92890f3bf2 /compiler/rustc_mir_transform/src/shim.rs | |
| parent | 1b8ab72680f36e783af84c1a3c4f8508572bd9f9 (diff) | |
| download | rust-820fce61e72a1bc9c8eb132afec9ab71c67f4923.tar.gz rust-820fce61e72a1bc9c8eb132afec9ab71c67f4923.zip | |
Some style nits
Diffstat (limited to 'compiler/rustc_mir_transform/src/shim.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/shim.rs | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs index 0d9a04b760a..9688ac8ed2e 100644 --- a/compiler/rustc_mir_transform/src/shim.rs +++ b/compiler/rustc_mir_transform/src/shim.rs @@ -298,10 +298,9 @@ fn local_decls_for_sig<'tcx>( fn dropee_emit_retag<'tcx>( tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, - dropee_ptr: Place<'tcx>, + mut dropee_ptr: Place<'tcx>, span: Span, ) -> Place<'tcx> { - let mut dropee_ptr = dropee_ptr; if tcx.sess.opts.unstable_opts.mir_emit_retag { let source_info = SourceInfo::outermost(span); // We want to treat the function argument as if it was passed by `&mut`. As such, we @@ -365,8 +364,8 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>) new_body(source, blocks, local_decls_for_sig(&sig, span), sig.inputs().len(), span); // The first argument (index 0), but add 1 for the return value. - let mut dropee_ptr = Place::from(Local::new(1 + 0)); - dropee_ptr = dropee_emit_retag(tcx, &mut body, dropee_ptr, span); + let dropee_ptr = Place::from(Local::new(1 + 0)); + let dropee_ptr = dropee_emit_retag(tcx, &mut body, dropee_ptr, span); if ty.is_some() { let patch = { | 
