clippy:: append_instead_of_extend
This commit is contained in:
parent
d709e6efef
commit
aa74c75d84
3 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ pub fn merge_codegen_units<'tcx>(
|
||||||
// Record that `second_smallest` now contains all the stuff that was in
|
// Record that `second_smallest` now contains all the stuff that was in
|
||||||
// `smallest` before.
|
// `smallest` before.
|
||||||
let mut consumed_cgu_names = cgu_contents.remove(&smallest.name()).unwrap();
|
let mut consumed_cgu_names = cgu_contents.remove(&smallest.name()).unwrap();
|
||||||
cgu_contents.get_mut(&second_smallest.name()).unwrap().extend(consumed_cgu_names.drain(..));
|
cgu_contents.get_mut(&second_smallest.name()).unwrap().append(&mut consumed_cgu_names);
|
||||||
|
|
||||||
debug!(
|
debug!(
|
||||||
"CodegenUnit {} merged into CodegenUnit {}",
|
"CodegenUnit {} merged into CodegenUnit {}",
|
||||||
|
|
|
@ -614,8 +614,8 @@ impl Inliner<'tcx> {
|
||||||
.vars_and_temps_iter()
|
.vars_and_temps_iter()
|
||||||
.map(|local| callee_body.local_decls[local].clone()),
|
.map(|local| callee_body.local_decls[local].clone()),
|
||||||
);
|
);
|
||||||
caller_body.source_scopes.extend(callee_body.source_scopes.drain(..));
|
caller_body.source_scopes.extend(&mut callee_body.source_scopes.drain(..));
|
||||||
caller_body.var_debug_info.extend(callee_body.var_debug_info.drain(..));
|
caller_body.var_debug_info.append(&mut callee_body.var_debug_info);
|
||||||
caller_body.basic_blocks_mut().extend(callee_body.basic_blocks_mut().drain(..));
|
caller_body.basic_blocks_mut().extend(callee_body.basic_blocks_mut().drain(..));
|
||||||
|
|
||||||
caller_body[callsite.block].terminator = Some(Terminator {
|
caller_body[callsite.block].terminator = Some(Terminator {
|
||||||
|
|
|
@ -90,8 +90,8 @@ fn dropck_outlives<'tcx>(
|
||||||
|
|
||||||
// "outlives" represent types/regions that may be touched
|
// "outlives" represent types/regions that may be touched
|
||||||
// by a destructor.
|
// by a destructor.
|
||||||
result.kinds.extend(constraints.outlives.drain(..));
|
result.kinds.append(&mut constraints.outlives);
|
||||||
result.overflows.extend(constraints.overflows.drain(..));
|
result.overflows.append(&mut constraints.overflows);
|
||||||
|
|
||||||
// If we have even one overflow, we should stop trying to evaluate further --
|
// If we have even one overflow, we should stop trying to evaluate further --
|
||||||
// chances are, the subsequent overflows for this evaluation won't provide useful
|
// chances are, the subsequent overflows for this evaluation won't provide useful
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue