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

disjunction in region bounds #5

Open
lcnr opened this issue Sep 4, 2023 · 0 comments
Open

disjunction in region bounds #5

lcnr opened this issue Sep 4, 2023 · 0 comments

Comments

@lcnr
Copy link
Owner

lcnr commented Sep 4, 2023

To explicitly handle where-clauses in binders and to fix rust-lang/rust#25860 we need to handle disjunctions of outlives requirements.

fn foo<'a, 'b, 'c>() {
    // `'d: 'a` and `'d: 'b`
    let x: for<'d> fn(&'a &'d (), &'b &'d ()) -> &'d () = todo!();
    let _y: fn(&'a &'a (), &'b &'b ()) -> &'c () = x;
    // need to prove `'d: 'c`,
    // can prove this if either `'a: 'c` or `'b: 'c` holds.
}
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

No branches or pull requests

1 participant