Skip to content

Immutable statics should only allow types which are Freeze #12432

Closed
@alexcrichton

Description

All statics are placed in rodata by LLVM (we mark them as constant), so any attempt at mutation will not succeed (it will segfault).

See #11583 (comment) and #11583 (comment). I wanted to make an official issue out of those comments.

Despite the discussion in #10577 to work on values of immutable statics, I think that this Freeze bound should apply to the type of the static instead.

Nominating.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions