-
-
Notifications
You must be signed in to change notification settings - Fork 774
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
fix(codegen): Support extern crate serde
not in toplevel module
#298
Conversation
@@ -1,6 +1,4 @@ | |||
#![cfg_attr(feature = "nightly", feature(plugin))] | |||
#![cfg_attr(feature = "nightly", plugin(clippy))] | |||
|
|||
extern crate serde; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this removed? Did it cause an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No error, just to demonstrate that things work even without "extern crate serde" at the top level. I kept the equivalent line in bench.rs so the build still uses both approaches.
Does this break any existing code? You changed quite a few tests' imports. |
This does not break any existing code. |
This makes |
@dtolnay: Once again, great work here. I'm working on merging this patch in by hand. |
@erickt I fixed the merge conflict myself. |
Ping @erickt - looks like you said this was ready to merge. Once you merge it, I will resolve the merge conflict in #293 (comment). |
Thanks @dtolnay! I've been swamped with work recently, and unfortunately that's resulted in lots of my projects suffering. Thanks for keeping up with this. |
Addresses #159.
The generated code looks like: