Skip to content

Commit

Permalink
Rollup merge of #108104 - matthiaskrgr:into, r=compiler-errors
Browse files Browse the repository at this point in the history
don't into self

don't into()-convert types to themselves
  • Loading branch information
matthiaskrgr authored Feb 16, 2023
2 parents 1fac415 + a1a6588 commit 9b2ee41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_infer/src/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ impl<'tcx> InferCtxt<'tcx> {
}

(ty::Alias(AliasKind::Projection, _), _) if self.tcx.trait_solver_next() => {
relation.register_type_equate_obligation(a.into(), b.into());
relation.register_type_equate_obligation(a, b);
Ok(b)
}
(_, ty::Alias(AliasKind::Projection, _)) if self.tcx.trait_solver_next() => {
relation.register_type_equate_obligation(b.into(), a.into());
relation.register_type_equate_obligation(b, a);
Ok(a)
}

Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/ctfe_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ fn has_back_edge(
return false;
}
// Check if any of the dominators of the node are also the node's successor.
doms.dominators(node)
.any(|dom| node_data.terminator().successors().into_iter().any(|succ| succ == dom))
doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom))
}

fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn external_generic_args<'tcx>(
});
GenericArgs::Parenthesized { inputs, output }
} else {
GenericArgs::AngleBracketed { args: args.into(), bindings: bindings.into() }
GenericArgs::AngleBracketed { args: args.into(), bindings }
}
}

Expand Down

0 comments on commit 9b2ee41

Please sign in to comment.