rust-lang / rustfmt

Format Rust code
https://rust-lang.github.io/rustfmt/
Apache License 2.0
6.06k stars 892 forks source link

Catalog `style_edition=2027` formatting differences #6371

Open ytmimi opened 1 month ago

ytmimi commented 1 month ago

Tracking issue documenting style_edition=2027 changes.

ytmimi commented 1 month ago

Break function return types before -> instead of breaking between () for zero argument functions

Related PR: https://github.com/rust-lang/rustfmt/pull/6362

style_edition == 2027

pub fn parse_conditional<'a, I: 'a>()
-> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a
where
    I: Stream<Item = char>,
{
}

style_edition <= 2024

pub fn parse_conditional<'a, I: 'a>(
) -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a
where
    I: Stream<Item = char>,
{
}