Skip to content

Trait methods with body and >1 unnamed parameters are wrongly rejected by resolve #34074

Closed
@petrochenkov

Description

@petrochenkov
Contributor

Reproduces on stable/beta/nightly.

trait Tr {
    // error: identifier `` is bound more than once in this parameter list
    fn f(u8, u8) {}
}

fn main() {
}

Activity

eddyb

eddyb commented on Jun 4, 2016

@eddyb
Member

I expect it parses as <invalid>: u8, <invalid>: u8 and it might lower to HIR as _: u8, _: u8 although nothing should care at that point about the argument list.
However, resolve running on AST, it has to treat <invalid> (the empty identifier) as _.

added a commit that references this issue on Jun 9, 2016

Auto merge of #34095 - petrochenkov:pathir2, r=jseyfried

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @eddyb@petrochenkov

      Issue actions

        Trait methods with body and >1 unnamed parameters are wrongly rejected by resolve · Issue #34074 · rust-lang/rust