Skip to content

Cannot call a unboxed-closure trait object with () syntax #16929

Closed
@huonw

Description

@huonw
#![feature(unboxed_closures)]


fn main() {
    let f: &Fn<(), ()> = &|&:| ();

    f()
}
<anon>:7:5: 7:8 error: expected function, found `&core::ops::Fn<(),()>`
<anon>:7     f()
             ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-closuresArea: Closures (`|…| { … }`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions