Skip to content

Allow generic associate types in trait paths #67510

Closed
@matthewjasper

Description

@matthewjasper

The following code should be accepted:

#![feature(generic_associated_types)]

trait X {
    type Y<'a>;
}

fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {}
// or perhaps:
// fn f(x: Box<dyn for<'a> X<Y<'a>=&'a ()>>) {}

fn g<T: X<Y<'a>=&'a ()>>() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-GATsArea: Generic associated types (GATs)A-parserArea: The lexing & parsing of Rust source code to an ASTC-feature-acceptedCategory: A feature request that has been accepted pending implementation.F-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions