Skip to content

fix(generic_const_exprs): Fix predicate inheritance for children of opaque types - #99801

Merged
bors merged 1 commit into
rust-lang:masterfrom
PixelDust22:fix/generic_const_exprs_parent_opaque_predicates
Nov 3, 2022
Merged

fix(generic_const_exprs): Fix predicate inheritance for children of opaque types#99801
bors merged 1 commit into
rust-lang:masterfrom
PixelDust22:fix/generic_const_exprs_parent_opaque_predicates

Conversation

@PixelDust22

@PixelDust22 PixelDust22 commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

Fixes #99705

We currently have a special case to perform predicate inheritance when the const item is in the generics. I think we're also going to need this for opaque return types. When evaluating the predicates applied to the associated item, it'll inherit from its parent, the opaque type, which will never have predicates applied. This PR bypass the opaque typed parent and inherit predicates directly from the function itself.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-const-generics Area: const generics (parameters and arguments) F-generic_const_exprs `#![feature(generic_const_exprs)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No associated item found when the associated item was used as const generic parameter in return type

9 participants