diff options
| author | lcnr <rust@lcnr.de> | 2023-09-29 11:34:50 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-09-29 11:34:50 +0200 |
| commit | a4f6770d83cb5aa82f10d8e8441ca5708600b077 (patch) | |
| tree | 89237755d0420af2b3e45abd78b24dff7da67567 /compiler/rustc_trait_selection/src/solve | |
| parent | c1f86f0bc87eaa0cf16bcf3de38793096ec4db94 (diff) | |
a small wf and clause cleanup
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/project_goals.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs index 0f9d36342ad..339a3e73846 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs @@ -346,14 +346,13 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> { ty::TraitRef::from_lang_item(tcx, LangItem::Sized, DUMMY_SP, [output]) }); - let pred = ty::Clause::from_projection_clause( - tcx, - tupled_inputs_and_output.map_bound(|(inputs, output)| ty::ProjectionPredicate { + let pred = tupled_inputs_and_output + .map_bound(|(inputs, output)| ty::ProjectionPredicate { projection_ty: tcx .mk_alias_ty(goal.predicate.def_id(), [goal.predicate.self_ty(), inputs]), term: output.into(), - }), - ); + }) + .to_predicate(tcx); // A built-in `Fn` impl only holds if the output is sized. // (FIXME: technically we only need to check this if the type is a fn ptr...) |
