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

Inconsistent syntax between struct and impl. #54523

Closed
kokjo opened this issue Sep 24, 2018 · 2 comments
Closed

Inconsistent syntax between struct and impl. #54523

kokjo opened this issue Sep 24, 2018 · 2 comments

Comments

@kokjo
Copy link

kokjo commented Sep 24, 2018

I am pretty new to rust, but the following issue confuses me.

Assume that we have a trait A.
For defining structs we have the following syntax:
struct Foo<Bar: A> {...}
but when writing implementations we write:
impl<Bar: A> Foo<Bar>{...}
Is it possible to introduce a new syntax for impl? Like:
impl Foo<Bar: A> {...}
which would just desugar to the above implementation?

The first implementation syntax seems inconsistent with the struct syntax.

@varkor
Copy link
Member

varkor commented Sep 24, 2018

Permitting the bounds on impl to be emitted is tracked in #15872.

@steveklabnik
Copy link
Member

Yes, additionally, new features like this need to go through an RFC. Closing!

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

3 participants