Skip to content

Running into segmentation fault with new closures #16774

Closed
@cburgdorf

Description

@cburgdorf

I'm playing with the new closures and ran into a segmentation fault when I tried this:

    #![feature(unboxed_closures)]
    #![feature(overloaded_calls)]

    fn main() {
        let mut test = box 5i;

        let change = ref |:| { *test = 10 };
        change();

        println!("{}", test);
    }

Not sure if this was reported before or a known issue but I thought I better report it.

/cc @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-closuresArea: Closures (`|…| { … }`)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions