Skip to content

Insufficient arguments error E0061 & E0050 would be more helpful if it printed what arguments are needed #33649

Closed
@kornelski

Description

@kornelski

When I call a function with insufficient arguments, rustc just says the number of arguments is wrong.

:4:5: 4:26 error: this function takes 1 parameter but 0 parameters were supplied [E0061]
:4 std::fs::File::open();
^~~~~~~~~~~~~~~~~~~~~

This would be much more helpful if it said which arguments, and what they are, e.g.:

error: The path argument was not supplied to the open function

or at least show the funcition definition in a note:

:4:5: 4:26 error: this function takes 1 parameter but 0 parameters were supplied [E0061]
:4 std::fs::File::open();
note: fn open<P: AsRef<Path>>(path: P) -> Result<File>

Similar problem applies to E0050 ("error: method foo has 1 parameter but the declaration in trait bar has 2").


rustc 1.10.0-nightly (2b79e05 2016-05-13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions