Skip to content

cfg[feature] is removed when feature name is too long #4783

@Longarithm

Description

@Longarithm

Input

pub(crate) fn f(
    #[cfg(feature = "this_feature_name_is_long_enough_not_to_fit_inside_the_standard_limit")] x: u64,
) -> () {}

Output

pub(crate) fn f(x: u64) -> () {}

Please note that the behaviour is the same where argument is actually used. I removed its usage just for simplicity.

Meta

  • rustfmt version: rustfmt 1.4.20-stable (48f6c32 2020-08-09) or rustfmt 1.4.36-nightly (7de6968 2021-02-07)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: cargo fmt or cargo +nightly fmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions