Skip to content

Anonymous trait method parameters - src/generics/assoc_items/types.md #1192

Closed
@tomasz-rozanski

Description

@tomasz-rozanski

In accordance to RFC #1685, this code is invalid in 2018 edition:

trait Contains {
    type A;
    type B;

    fn contains(&self, &Self::A, &Self::B) -> bool;
}

and should be changed to:

trait Contains {
    type A;
    type B;

    fn contains(&self, _: &Self::A, _: &Self::B) -> bool;
}

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