diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-09-12 20:37:17 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-12 20:37:17 +1000 |
| commit | 57020e0f8c30feae31b321325a34d6ebe6679cce (patch) | |
| tree | e6d230fc3e4fb33be18e5fda9a501765bb43f158 /compiler/rustc_const_eval/src | |
| parent | 3ba12756d3bebefc18b0f623dece8898adcea6c3 (diff) | |
| parent | 6d064295c8fb7413cb0500289f922f8d7feb38dc (diff) | |
| download | rust-57020e0f8c30feae31b321325a34d6ebe6679cce.tar.gz rust-57020e0f8c30feae31b321325a34d6ebe6679cce.zip | |
Rollup merge of #130250 - compiler-errors:useless-conversion, r=jieyouxu
Fix `clippy::useless_conversion` Self-explanatory. Probably the last clippy change I'll actually put up since this is the only other one I've actually seen in the wild.
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/eval_queries.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/call.rs | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs index 7ccebd83f24..da4173f9032 100644 --- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs @@ -75,12 +75,7 @@ fn eval_body_using_ecx<'tcx, R: InterpretationResult<'tcx>>( // This can't use `init_stack_frame` since `body` is not a function, // so computing its ABI would fail. It's also not worth it since there are no arguments to pass. - ecx.push_stack_frame_raw( - cid.instance, - body, - &ret.clone().into(), - StackPopCleanup::Root { cleanup: false }, - )?; + ecx.push_stack_frame_raw(cid.instance, body, &ret, StackPopCleanup::Root { cleanup: false })?; ecx.storage_live_for_always_live_locals()?; // The main interpreter loop. diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 419d412b063..0f2b22f035b 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -823,7 +823,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { (Abi::Rust, fn_abi), &[FnArg::Copy(arg.into())], false, - &ret.into(), + &ret, Some(target), unwind, ) |
