Skip to content

enable elision in where-clauses on functions #45667

Closed

Description

The following test case does not presently work, but ought to:

trait Trait<'a> { }

// Supporting `'_` here is #15872:
impl<T> Trait<'_> for T { }

// Supporting `'_` here is this issue:
fn foo<T>(t: T)
where T: Trait<'_>
{ 
}

fn main() { 
  foo(22);
}

This is, I believe, blocked on #15872, because the same work that enables '_ to expand to an early-bound region in that work ought to make supporting '_ in functions fairly straightforward.

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

Metadata

Assignees

No one assigned

    Labels

    A-rust-2018-previewArea: The 2018 edition previewC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-traitsWorking group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions