Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation issue on first item in generic bounds #4636

Closed
calebcartwright opened this issue Jan 12, 2021 · 0 comments · Fixed by #4640
Closed

Indentation issue on first item in generic bounds #4636

calebcartwright opened this issue Jan 12, 2021 · 0 comments · Fixed by #4640

Comments

@calebcartwright
Copy link
Member

Reported in rust-lang/rust#80843 (comment)

Input

pub trait PrettyPrinter<'tcx>:
    Printer<
        'tcx,
        Error = fmt::Error,
        Path = Self,
        Region = Self,
        Type = Self,
        DynExistential = Self,
        Const = Self,
    > + fmt::Write
    {
         //
    }

Output

pub trait PrettyPrinter<'tcx>:
    Printer<
    'tcx,
    Error = fmt::Error,
    Path = Self,
    Region = Self,
    Type = Self,
    DynExistential = Self,
    Const = Self,
> + fmt::Write
{
    //
}

Expected output

pub trait PrettyPrinter<'tcx>:
    Printer<
        'tcx,
        Error = fmt::Error,
        Path = Self,
        Region = Self,
        Type = Self,
        DynExistential = Self,
        Const = Self,
    > + fmt::Write
{
    //
}

Meta

Bisected to 1.4.28 where a bug fix for handling comments between bounds was introduced (#4474)

@calebcartwright calebcartwright added poor-formatting 1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release labels Jan 12, 2021
@calebcartwright calebcartwright self-assigned this Jan 12, 2021
@calebcartwright calebcartwright added this to the 1.4.32 milestone Jan 13, 2021
@calebcartwright calebcartwright added 1x-backport:completed and removed 1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release labels Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant