Skip to content

Rustfmt yeets const param defaults #4816

Closed
@BoxyUwU

Description

@BoxyUwU

Describe the bug
Rustfmt yeets const param defaults

playground

#![feature(const_generics_defaults)]
struct Foo<const N: usize = 5usize>;

fn main() {}

run cargo +nightly fmt or rustfmt or run the tool in playground etc and it gets formatted to:

#![feature(const_generics_defaults)]
struct Foo<const N: usize>;

fn main() {}

Expected behavior
it to not do this

Meta

  • rustfmt version: rustfmt 1.4.37-nightly (0bd2b19 2021-04-03)
  • From where did you install rustfmt?: playground/cargo
  • How do you run rustfmt: playground/cargo fmt/rustfmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions