Skip to content

Borrowing ~fn to &fn leaks #6141

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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