about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-11 17:48:48 +0000
committerbors <bors@rust-lang.org>2021-09-11 17:48:48 +0000
commit43769af69e43d0fb9770f0a392671f000595df78 (patch)
tree4bd8ff3b37565cf6e4f43cfec62d63bfebc3f608 /compiler/rustc_mir_transform/src
parent641e02f388acc6b1d316a59c605a32d1711a8758 (diff)
parent2a8ad06689266d3959f35e407f8b6b2047a2457e (diff)
downloadrust-43769af69e43d0fb9770f0a392671f000595df78.tar.gz
rust-43769af69e43d0fb9770f0a392671f000595df78.zip
Auto merge of #88857 - workingjubilee:rollup-zrtvspt, r=workingjubilee
Rollup of 10 pull requests

Successful merges:

 - #87904 (Reword description of automatic impls of `Unsize`.)
 - #88147 (Fix non-capturing closure return type coercion)
 - #88209 (Improve error message when _ is used for in/inout asm operands)
 - #88668 (Change more x64 size checks to not apply to x32.)
 - #88733 (Fix ICE for functions with more than 65535 arguments)
 - #88757 (Suggest wapping expr in parentheses on invalid unary negation)
 - #88779 (Use more accurate spans for "unused delimiter" lint)
 - #88830 (Add help for E0463)
 - #88849 (don't clone types that are Copy (clippy::clone_on_copy))
 - #88850 (don't convert types into identical types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/lower_slice_len.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/lower_slice_len.rs b/compiler/rustc_mir_transform/src/lower_slice_len.rs
index 30de374a2d8..a2cce9f1eda 100644
--- a/compiler/rustc_mir_transform/src/lower_slice_len.rs
+++ b/compiler/rustc_mir_transform/src/lower_slice_len.rs
@@ -75,13 +75,11 @@ fn lower_slice_len_call<'tcx>(
                     let deref_arg = tcx.mk_place_deref(arg);
                     let r_value = Rvalue::Len(deref_arg);
                     let len_statement_kind = StatementKind::Assign(Box::new((*dest, r_value)));
-                    let add_statement = Statement {
-                        kind: len_statement_kind,
-                        source_info: terminator.source_info.clone(),
-                    };
+                    let add_statement =
+                        Statement { kind: len_statement_kind, source_info: terminator.source_info };
 
                     // modify terminator into simple Goto
-                    let new_terminator_kind = TerminatorKind::Goto { target: bb.clone() };
+                    let new_terminator_kind = TerminatorKind::Goto { target: *bb };
 
                     let patch = SliceLenPatchInformation { add_statement, new_terminator_kind };