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

Support recognizing default generic parameters. #6

Merged
merged 1 commit into from
Jan 5, 2020

Conversation

kennytm
Copy link
Contributor

@kennytm kennytm commented Dec 29, 2019

Make this work:

pin_project! {
    struct Foo<T = Bar> {
        field: T,
    }
}

The default parameter is not applied to the generated Projection/ProjectionRef/__Origin types.

@taiki-e
Copy link
Owner

taiki-e commented Jan 5, 2020

Thanks!

bors r+

bors bot added a commit that referenced this pull request Jan 5, 2020
6: Support recognizing default generic parameters. r=taiki-e a=kennytm

Make this work:

```rust
pin_project! {
    struct Foo<T = Bar> {
        field: T,
    }
}
```

The default parameter is not applied to the generated `Projection`/`ProjectionRef`/`__Origin` types.

Co-authored-by: kennytm <kennytm@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jan 5, 2020

Build succeeded

  • style (clippy)
  • style (rustdoc)
  • style (rustfmt)
  • test (1.37.0)
  • test (beta)
  • test (nightly)
  • test (stable)

@bors bors bot merged commit ab2fa17 into taiki-e:master Jan 5, 2020
@taiki-e
Copy link
Owner

taiki-e commented Jan 5, 2020

Published in 0.1.2.

@kennytm kennytm deleted the gen-default branch January 6, 2020 06:12
bors bot added a commit to taiki-e/pin-project that referenced this pull request Jan 20, 2020
175: Add some tests r=taiki-e a=taiki-e

Refs: taiki-e/pin-project-lite#6, taiki-e/pin-project-lite#7

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Jun 4, 2020
@taiki-e taiki-e removed the C-enhancement Category: A new feature or an improvement for an existing one label Jan 7, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants