Skip to content

Rustfmt is … confused 😳 by // comment after pub and before trait  #5841

Description

@danielhenrymantilla

I tried formatting this code:

pub // should the following be private?
trait Asso<'ciativity> {}

Rustfmt left me with this gem:

pub trait Asso<'ciativity> // should the following be private?
trait Ass
{
}

👀

  • (note: @Noratrieb did not let me rename the trait 👉 👈)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEP-lowLow priority

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions