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

#[derive(Serialize)] with type defaults? #158

Closed
pwoolcoc opened this issue Sep 21, 2015 · 3 comments
Closed

#[derive(Serialize)] with type defaults? #158

pwoolcoc opened this issue Sep 21, 2015 · 3 comments
Assignees
Milestone

Comments

@pwoolcoc
Copy link
Contributor

I have some code like this:

trait MyTrait: Debug + Serialize {}

#[derive(Serialize)]
struct MyStruct<T, U: MyTrait = i32> { t: T, u: U }

Which errors out with the message "error: associated type bindings are not allowed here".
The full error is here: https://gist.github.com/pwoolcoc/b94407ed648a125969f3, and I have an example project at https://github.com/pwoolcoc/serde-associated-types-bug


rustc 1.5.0-nightly (0418a43fa 2015-09-21)
binary: rustc
commit-hash: 0418a43fa3ce430d18e87c66afb2185395f354d6
commit-date: 2015-09-21
host: x86_64-unknown-linux-gnu
release: 1.5.0-nightly
cargo 0.6.0-nightly (4080ea8 2015-09-20)
@erickt
Copy link
Member

erickt commented Sep 22, 2015

Nice find! I need to add support for this.

@dtolnay
Copy link
Member

dtolnay commented Apr 14, 2016

I have a fix at dtolnay@fdc81db but it conflicts with #285, so I will wait for that to merge before opening a PR.

@dtolnay
Copy link
Member

dtolnay commented Apr 25, 2016

Fixed in #295, this can be closed.

@oli-obk oli-obk closed this as completed May 11, 2016
@dtolnay dtolnay added this to the v0.7.4 milestone May 17, 2016
@dtolnay dtolnay self-assigned this Jun 7, 2016
rubdos pushed a commit to rubdos/serde that referenced this issue Jun 20, 2017
Add LowerHex and UpperHex formatting

These were mysteriously missing from BigUint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants