mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 22:54:00 +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 {
|
match assoc_ty {
|
||||||
Some(res_assoc_ty) => {
|
Some(res_assoc_ty) => {
|
||||||
let ty = self.table.new_type_var();
|
let ty = self.table.new_type_var();
|
||||||
let mut builder = Substs::build_for_def(self.db, res_assoc_ty).push(inner_ty);
|
let builder = Substs::build_for_def(self.db, res_assoc_ty)
|
||||||
for ty in params {
|
.push(inner_ty)
|
||||||
builder = builder.push(ty.clone());
|
.fill(params.iter().cloned());
|
||||||
}
|
|
||||||
|
|
||||||
let projection = ProjectionPredicate {
|
let projection = ProjectionPredicate {
|
||||||
ty: ty.clone(),
|
ty: ty.clone(),
|
||||||
projection_ty: ProjectionTy {
|
projection_ty: ProjectionTy {
|
||||||
|
|
Loading…
Reference in a new issue