Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
Rollup merge of rust-lang#122406 - compiler-errors:next-solver-asynck…
Browse files Browse the repository at this point in the history
…ind-wf, r=lcnr

Fix WF for `AsyncFnKindHelper` in new trait solver

`to_opt_closure_kind` ICEs when it sees placeholders... so don't do that

no test b/c I'm too lazy to write a no-core test for this, but I could be convinced otherwise

r? lcnr
  • Loading branch information
jhpratt authored Mar 14, 2024
2 parents 16997d6 + dd0f41f commit 136f313
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2436,8 +2436,9 @@ impl<'tcx> Ty<'tcx> {
},

// "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),

Expand Down

0 comments on commit 136f313

Please sign in to comment.