Skip to content

default methods: parser rejects methods with underscore names for parameters #8468

@pnkfelix

Description

@pnkfelix
trait Foo {
    fn m(&self, _:int) { }
}

fn main() { }
% rustc /tmp/foo.rs
/tmp/foo.rs:2:16: 2:17 error: expected type, found token UNDERSCORE
/tmp/foo.rs:2     fn m(&self, _:int) { }
                              ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTA-trait-systemArea: Trait system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions