Skip to content

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
matthiaskrgr committed Mar 14, 2024
2 parents b4dffc9 + dd0f41f commit 54b7300
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 54b7300

Please sign in to comment.