Skip to content

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

@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

    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions