Skip to content

Reject argument name in function signature for inconsistency #838

Closed
@bombless

Description

@bombless

Function signature is not even documented in the reference.
For a function signature

type T = fn(arg1: c_void, c_void);

the argument names can be ignored, and there's two drawbacks here:

  • Fn/ FnOnce/ FnMut traits don't have argument names, so it leads to inconsistency
  • it's harder to parse if argument names are optional, for syntax-highlighting and other purposes

And the syntax of extern functions should be changed accordingly for obvious reason.

So this will break current code, thus need to be landed before 1.0, or even before beta.

cc @nikomatsakis @AngryLawyer @mvdnes

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