Skip to content
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

Syntax error in trait definition #928

Closed
flodiebold opened this issue Mar 4, 2019 · 1 comment
Closed

Syntax error in trait definition #928

flodiebold opened this issue Mar 4, 2019 · 1 comment
Assignees

Comments

@flodiebold
Copy link
Member

trait Foo {
    fn foo(&self, mut x: u32) {
    }
}

gives a syntax error on the mut. This wouldn't be allowed (by rustc) for a method without body, but with a body, it's fine.

@matklad matklad self-assigned this Mar 4, 2019
@matklad
Copy link
Member

matklad commented Mar 4, 2019

anonymous parameters strike again: rust-lang/rfcs#1685 :)

matklad added a commit that referenced this issue Mar 4, 2019
@matklad matklad closed this as completed Mar 4, 2019
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