stepancheg/rust-protobuf — pull request #32 by jansegre (2014-09-29 16:51:30+00:00)
Title: Fix private type in exported type paremater bound.

With `rustc 0.12.0-nightly (94b0aace1 2014-09-27 23:12:54 +0000)` the following error occurs:

```
src/lib/rt.rs:91:36: 91:37 error: private type in exported type parameter bound
src/lib/rt.rs:91 pub fn vec_packed_varint_data_size(vec: &[T]) -> u32 {
^
src/lib/rt.rs:96:43: 96:44 error: private type in exported type parameter bound
src/lib/rt.rs:96 pub fn vec_packed_varint_zigzag_data_size(vec: &[T]) -> u32 {
^
src/lib/rt.rs:101:31: 101:32 error: private type in exported type parameter bound
src/lib/rt.rs:101 pub fn vec_packed_varint_size(field_number: u32, vec: &[T]) -> u32 {
^
src/lib/rt.rs:111:38: 111:39 error: private type in exported type parameter bound
src/lib/rt.rs:111 pub fn vec_packed_varint_zigzag_size(field_number: u32, vec: &[T]) -> u32 {
^
src/lib/rt.rs:125:26: 125:27 error: private type in exported type parameter bound
src/lib/rt.rs:125 pub fn value_size_no_tag(value: T, wt: wire_format::WireType) -> u32 {
^
src/lib/rt.rs:134:19: 134:20 error: private type in exported type parameter bound
src/lib/rt.rs:134 pub fn value_size(field_number: u32, value: T, wt: wire_format::WireType) -> u32 {
^
error: aborting due to 6 previous errors
Could not compile `protobuf`.
```

This commit aims to fix it. The drawbacks are that `ProtobufVarint` and `ProtobufVarintZigzag` are now public, which is what the compiler is trying to enforce.