Skip to content

A struct defined to hold a closure accepts a proc in its constructor #11515

Closed
@bstrie

Description

@bstrie

This seems like it shouldn't be possible:

struct Test<'s> {
    func: 's ||
}

fn main() {
    let test = ~Test { func: proc() {} };
}

...but it compiles just fine on 0.9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions