Skip to content

Generics in associated types #3006

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
msiglreith opened this issue Sep 9, 2018 · 2 comments
Closed

Generics in associated types #3006

msiglreith opened this issue Sep 9, 2018 · 2 comments
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@msiglreith
Copy link

Generics of associated types are removed by rustfmt.
The future is not stable but I think the syntax is already (?).

Before:

trait Foo<'a> {
    type Bar<'a>;
}

After:

trait Foo<'a> {
    type Bar;
}

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

@topecongiro topecongiro added the bug Panic, non-idempotency, invalid code, etc. label Sep 10, 2018
@topecongiro topecongiro added this to the 1.0 (edition rc1) milestone Sep 10, 2018
@topecongiro topecongiro added the blocked Blocked on rustc, an RFC, etc. label Sep 11, 2018
@topecongiro
Copy link
Contributor

This seems to be a bug in rustc, the ast node does not contain the lifetime bounds.

@topecongiro topecongiro removed this from the 1.0 (edition rc1) milestone Sep 11, 2018
@topecongiro topecongiro removed the blocked Blocked on rustc, an RFC, etc. label Sep 19, 2018
@topecongiro
Copy link
Contributor

Hmm, never mind: we were just ignoring it.

topecongiro added a commit to topecongiro/rustfmt that referenced this issue Sep 19, 2018
@nrc nrc closed this as completed in #3035 Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

2 participants