Skip to content

disjunction in region bounds #5

Open
@lcnr

Description

@lcnr

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.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions