Skip to content

Pretty printing loses associated type generics and where clauses #67509

Closed

Description

The following code:

#![feature(generic_associated_types)]

trait X {
    type Y<T>: i32 where Self: Sized;
}

impl X for () {
    type Y<T> where Self: Sized = u32;
}

is pretty printed as

#![feature(generic_associated_types)]

trait X {
    type
    Y: i32;
}

impl X for () {
    type
    Y
    =
    u32;
}

This presumably also affects procedural macros.

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-prettyArea: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions