Skip to content

Cannot handle generic associated type with where statement #6274

Closed
@ArcticLampyrid

Description

@ArcticLampyrid

For code:

pub trait Foo {
    type Bar
    where
        Self: Sized;
}

impl Foo for u8 {
    // note: there is a space between `u16` and LineFeed
    type Bar = u16 
    where Self: Sized;
}

I got the error:

$ cargo fmt
error[internal]: left behind trailing whitespace
 --> \\?\D:\foo\src\a.rs:9:9:19
  |
9 |     type Bar = u16 
  |                   ^
  |

warning: rustfmt has failed to format. See previous 1 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions