Skip to content

Rustfmt eating the colon in bound-less where clause entries (for lifetimes). #4637

Open
@steffahn

Description

@steffahn
pub fn foo<'a>()
where
    'a: ,
{
}

becomes

pub fn foo<'a>()
where
    'a,
{
}

resulting in syntax error.

This kind of code can actually be usefult to turn 'a into an early bound lifetime.

Tested in the rustfmt shipped with nightly rust (rustfmt 1.4.30-nightly (acd9486 2020-12-20)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions