Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WF for AsyncFnKindHelper in new trait solver #122406

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait... how does Bound appear? shouldn't we map this back to infer vars again? Is it used in const eval which canonicalizes but never instantiates?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bound may no longer be needed 🤔 -- i think that was preexisting

// may be encountered in generic `AsyncFnKindHelper` goals.
Bound(..) | Placeholder(_) | Param(_) | Infer(_) => None,

Error(_) => Some(ty::ClosureKind::Fn),

Expand Down
Loading