Skip to content

Remove reference to #[cold] in section on match expressions #1213

Closed
@junbl

Description

@junbl

The section Attributes on match arms lists #[cold] as one of the macros that can be applied to match guards:

The only attributes that have meaning on match arms are cfg, cold, and the lint check attributes.

However, attempting to do so generates this warning:

     |
1272 |                 #[cold]
     |                 ^^^^^^^
     |
     = note: `#[warn(unused_attributes)]` on by default
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: see issue #80564 <https://github.com/rust-lang/rust/issues/80564> for more information

Therefore, it seems like the reference to cold should be removed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: AttributesEasyWe believe this would not be difficult to actually fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions