Skip to content

Fn is apparently not implemented for fn #20768

Closed
@kemurphy

Description

@kemurphy
fn foo(x: u32) -> u32 { x }

fn main() {
    let x = foo.call((42,));
    println!("{}", x);
}
<anon>:4:17: 4:28 error: type `fn(u32) -> u32 {foo}` does not implement any method in scope named `call`
<anon>:4     let x = foo.call((42,));
                         ^~~~~~~~~~~
error: aborting due to previous error

http://is.gd/XTrYgZ

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions