Skip to content

Commit 0360ed5

Browse files
committed
check arg_idx >= n_params only if arg_idx >= n_required_params
1 parent 75fb3de commit 0360ed5

File tree

1 file changed

+5
-5
lines changed
  • crates/ide-completion/src/completions

1 file changed

+5
-5
lines changed

crates/ide-completion/src/completions/type.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ pub(crate) fn complete_type_path(
181181
acc.add_type_alias_with_eq(ctx, alias);
182182
}
183183
});
184-
}
185184

186-
let n_params =
187-
trait_.type_or_const_param_count(ctx.sema.db, false);
188-
if arg_idx >= n_params {
189-
return; // only show assoc types
185+
let n_params =
186+
trait_.type_or_const_param_count(ctx.sema.db, false);
187+
if arg_idx >= n_params {
188+
return; // only show assoc types
189+
}
190190
}
191191
}
192192
}

0 commit comments

Comments
 (0)