Skip to content

enable elision in where-clauses on functions #45667

Closed
@nikomatsakis

Description

@nikomatsakis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionC-bugCategory: This is a bug.F-rust_2018_preview`#![feature(rust_2018_preview)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-traits[RETIRED] Working group: Traits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions