mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Use fill instread of for loop
This commit is contained in:
parent
b61ad6a964
commit
76d688a328
1 changed files with 3 additions and 5 deletions
|
@ -375,11 +375,9 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
|||
match assoc_ty {
|
||||
Some(res_assoc_ty) => {
|
||||
let ty = self.table.new_type_var();
|
||||
let mut builder = Substs::build_for_def(self.db, res_assoc_ty).push(inner_ty);
|
||||
for ty in params {
|
||||
builder = builder.push(ty.clone());
|
||||
}
|
||||
|
||||
let builder = Substs::build_for_def(self.db, res_assoc_ty)
|
||||
.push(inner_ty)
|
||||
.fill(params.iter().cloned());
|
||||
let projection = ProjectionPredicate {
|
||||
ty: ty.clone(),
|
||||
projection_ty: ProjectionTy {
|
||||
|
|
Loading…
Reference in a new issue