Skip to content

Const generic param disappears after rustfmt #124942

Closed as not planned
Closed as not planned
@n3d-qmp

Description

@n3d-qmp

I tried this code:

#![feature(generic_const_items)]
trait Trait {
    const N: isize;
}

const C<T: Trait>: isize = T::N;

After rustfmt generic param disappears:

#![feature(generic_const_items)]
trait Trait {
    const N: isize;
}

const C: isize = T::N;

Meta

rustc --version --verbose:
Tested on playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)A-rustfmtArea: RustfmtC-bugCategory: This is a bug.F-generic_const_items`#![feature(generic_const_items)]`requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions