Skip to content

once fn/proc() allows use-after-move of captured variable #10398

Closed
@ben0x539

Description

@ben0x539

and crashes, inevitably.

fn main() {
    let x = ~"foo";
    let f: proc() = proc() {
        let _a = x;
        drop(x);
    };
    f();
}

Metadata

Metadata

Assignees

Labels

I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions