crabtw/rust-bindgen — pull request #148 by chris-chambers (2014-12-31 22:50:03+00:00)
Title: Adds Default impls for generated composites.

gen.rs
- Structs and unions now emit an implementation of the `Default` trait
using `std::mem::zeroed` to create a zeroed instance.

tests/support.rs
- AST comparisons are now done on the pretty-printed version of the
ASTs. Differences in AttrIds and some identifiers (generated with
gensym to ensure uniqueness) made it unreliable to compare the ASTs
directly. This way should work, even if it doesn't score many points
for style.

tests/*
- Updated to use `Default::default()` where appropriate.
- Eliminated a few warnings.