Skip to content

Cold Structs #54044

Closed
Closed
@cramertj

Description

@cramertj
#[cold]
struct DonnerParty;

fn main() {
    #[cold] 5;
}

Is it intentional that this work? If so, what is it supposed to do? The reference lists it as a function-only attribute, but I've always known it to work on expressions like loops as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions