Skip to content

Borrowing ~fn to &fn leaks #6141

Closed
Closed
@brson

Description

@brson

Fallout from demoding. This will leave a dangling allocation on the exchange heap.

fn run(f: &fn()) {
    f()
}

fn main() {
    let f: ~fn() = || ();
    run(f);
}

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions