Skip to content

Multi-line Fn supertraits are indented improperly #6127

Open
@swooster

Description

@swooster

Multi-line supertraits appear to be insufficiently indented:

trait Foo:
    Fn(
    ReallyLongTypeName,
    ReallyLongTypeName,
    ReallyLongTypeName,
    ReallyLongTypeName,
) -> ReallyLongTypeName
{
}

I'd prefer the later lines to be indented an extra level:

trait Foo:
    Fn(
        ReallyLongTypeName,
        ReallyLongTypeName,
        ReallyLongTypeName,
        ReallyLongTypeName,
    ) -> ReallyLongTypeName
{
}

(playground example)

Thank you!

Activity

ytmimi

ytmimi commented on Mar 28, 2024

@ytmimi
Contributor

@swooster thanks for the report! You're right the indentation seems off here

Flowrey

Flowrey commented on Mar 29, 2024

@Flowrey

Hi! Can i give it a try ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @swooster@ytmimi@Flowrey

      Issue actions

        Multi-line Fn supertraits are indented improperly · Issue #6127 · rust-lang/rustfmt