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

Destructuring isn't supported in default trait methods' arguments. #14267

Closed
eddyb opened this issue May 17, 2014 · 3 comments
Closed

Destructuring isn't supported in default trait methods' arguments. #14267

eddyb opened this issue May 17, 2014 · 3 comments
Labels
A-grammar Area: The grammar of Rust A-parser Area: The parsing of Rust source code to an AST. A-traits Area: Trait system C-feature-request Category: A feature request, i.e: not implemented / a PR.

Comments

@eddyb
Copy link
Member

eddyb commented May 17, 2014

Minimal testcase:

trait Foo {
    // error: expected `,` but found `{`
    fn foo(self, Bar {baz}: Bar) {}
}
@steveklabnik steveklabnik added the A-traits Area: Trait system label Jan 23, 2015
@huonw huonw added A-grammar Area: The grammar of Rust A-parser Area: The parsing of Rust source code to an AST. labels Sep 29, 2015
@steveklabnik
Copy link
Member

Triage: no change

@petrochenkov
Copy link
Contributor

This won't be possible (at least without uber-hacks) until anonymous function parameters are removed from the language rust-lang/rfcs#1685.

@Mark-Simulacrum Mark-Simulacrum added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 21, 2017
@steveklabnik
Copy link
Member

steveklabnik commented Sep 24, 2018

Anonymous function parameters have been removed in the 2018 edition, and this now works!

https://play.rust-lang.org/?gist=fd4b27d31be83725a97c1975775dbd38&version=nightly&mode=debug&edition=2018

Closing.

lnicola pushed a commit to lnicola/rust that referenced this issue Mar 13, 2023
…eykril

internal: Mark unresolved field, unresolved method and expected function diagnostics experimental

Our type checking is still not good enough for us to have these diagnostics be enabled by default it seems so let's mark them as experimental for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust A-parser Area: The parsing of Rust source code to an AST. A-traits Area: Trait system C-feature-request Category: A feature request, i.e: not implemented / a PR.
Projects
None yet
Development

No branches or pull requests

5 participants