Skip to content

Commit

Permalink
Apply nits
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 13, 2024
1 parent 760fbdf commit 2701a41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/needless_borrows_for_generic_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ fn is_mixed_projection_predicate<'tcx>(
&& (term_param_ty.index as usize) < generics.parent_count
{
// The inner-most self type is a type parameter from the current function.
let mut projection_ty = projection_predicate.projection_term;
let mut projection_term = projection_predicate.projection_term;
loop {
match *projection_ty.self_ty().kind() {
match *projection_term.self_ty().kind() {
ty::Alias(ty::Projection, inner_projection_ty) => {
projection_ty = inner_projection_ty.into();
projection_term = inner_projection_ty.into();
},
ty::Param(param_ty) => {
return (param_ty.index as usize) >= generics.parent_count;
Expand Down

0 comments on commit 2701a41

Please sign in to comment.