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

strengthen higher ranked where-bound to avoid breakage #5

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Mar 5, 2024

The current where-bound is weaker than the actual impl. Calling some functions, e.g. fn to_boxes_have_common_continuum actually requires using different higher ranked lifetimes for &Box and &Scalar. Trying to use the where-bounds in this case results in a higher-ranked region error. This previously compiled as we eagerly discarded the where-bounds and used the impls instead. This will stop being the case once rust-lang/rust#119820 lands, breaking your code.

Please ask for clarification if you would like further information. I apologize for the inconvenience.

the current where-bound is sometimes
weaker than the actual impl. We previously
discarded them eagerly. This will break once
rust-lang/rust#119820
lands
@lcnr lcnr changed the title strengthen higher ranked where-bound strengthen higher ranked where-bound to avoid breakage Mar 5, 2024
@lycantropos lycantropos merged commit b122969 into lycantropos:master Mar 6, 2024
6 of 35 checks passed
@lycantropos
Copy link
Owner

I do not fully understand the underlying issue, only that bounds need to be stricter

tests are passing locally, so I think everything should be fine, thanks a lot for this out-of-the-blue PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants