Skip to content

Unboxed closure upvars are sometimes not marked as used mutably #18336

Closed
@bkoropoff

Description

@bkoropoff

This causes spurious warnings that a variable did not need to be declared mutable. Example:

#![feature(unboxed_closures)]

fn main() {
    let mut x = 0u;
    move |&mut:| x = 1;
}

Note that this current ICEs due to #18238, but becomes a problem once that is fixed.

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