Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomasz-rozanski opened this issue May 25, 2019 · 1 comment
Closed

Comments

@tomasz-rozanski
Copy link
Contributor

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;
}
@tomasz-rozanski tomasz-rozanski changed the title Anonymous trait method parameters - Associated types (14.8.2) Anonymous trait method parameters - src/generics/assoc_items/types.md May 25, 2019
@tomasz-rozanski
Copy link
Contributor Author

I made a pull request for this issue. Feel free to close the thread if merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants