Skip to content

#[non_exhaustive] affects closure captures independent of what crate it's in. #2210

Description

@theemathas

The reference is outdated. It currently says that closure captures are crate-dependent. https://doc.rust-lang.org/nightly/reference/types/closure.html#r-type.closure.capture.precision.wildcard.destructuring

Enums marked with #[non_exhaustive] from other crates are always treated as having multiple variants. See type.closure.capture.precision.discriminants.non_exhaustive.

However, closure captures are now crate-independent. See rust-lang/rust#150681 and rust-lang/rust#151786

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions