Skip to content

Deleted comments in type aliases #5297

Open
@AndrewKvalheim

Description

@AndrewKvalheim

Some inline comments in type alias declarations are removed during formatting.

Steps to reproduce:

$ rustfmt --version
rustfmt 1.4.38-stable (9d1b210 2022-02-23)
$ rustfmt --emit stdout <(echo 'type Cycle = [u64 /* seconds */; 3];')

Expected output:

type Cycle = [u64 /* seconds */; 3];

Actual output:

type Cycle = [u64; 3];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions