From dd0f41f003d141efec3404e4b750589b348bd5c6 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 12 Mar 2024 16:07:01 -0400 Subject: [PATCH] Fix WF for AsyncFnKindHelper in new trait solver --- compiler/rustc_middle/src/ty/sty.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index cac12e5ee0b..11065b2a382 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -2436,8 +2436,9 @@ pub fn to_opt_closure_kind(self) -> Option { }, // "Bound" types appear in canonical queries when the - // closure type is not yet known - Bound(..) | Param(_) | Infer(_) => None, + // closure type is not yet known, and `Placeholder` and `Param` + // may be encountered in generic `AsyncFnKindHelper` goals. + Bound(..) | Placeholder(_) | Param(_) | Infer(_) => None, Error(_) => Some(ty::ClosureKind::Fn),