Skip to content

Commit

Permalink
Unrolled build for rust-lang#122406
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122406 - compiler-errors:next-solver-asynckind-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
rust-timer authored Mar 14, 2024
2 parents fe61575 + dd0f41f commit cc70732
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 cc70732

Please sign in to comment.