Skip to content

Commit 271b4d6

Browse files
committed
use ty.well_formed() helper function
1 parent b5040c2 commit 271b4d6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

chalk-solve/src/wf.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ where
203203
fields.fold(gb.interner(), &mut input_types);
204204
// ...in a where clause.
205205
where_clauses.fold(gb.interner(), &mut input_types);
206-
gb.all(
207-
input_types
208-
.into_iter()
209-
.map(|ty| DomainGoal::WellFormed(WellFormed::Ty(ty))),
210-
)
206+
gb.all(input_types.into_iter().map(|ty| ty.well_formed()))
211207
},
212208
)
213209
});
@@ -443,7 +439,7 @@ fn compute_assoc_ty_goal<I: Interner>(
443439
// We require that `WellFormed(T)` for each type that appears in the value
444440
let wf_goals = input_types
445441
.into_iter()
446-
.map(|ty| DomainGoal::WellFormed(WellFormed::Ty(ty)))
442+
.map(|ty| ty.well_formed())
447443
.casted(interner);
448444

449445
// Check that the `value_ty` meets the bounds from the trait.

0 commit comments

Comments
 (0)