cristicbz/rust-doom

Compilation error in wad crate with rust 1.5 nightly

edward-san opened this issue · 1 comments

   Compiling wad v0.0.1 (file:///home/edward-san/doom-rust)
src/wad/image.rs:38:31: 38:33 error: unary negation of unsigned integers may be removed in the future
src/wad/image.rs:38         let mut pixels = vec![-1; width * height];
                                                  ^~
src/wad/image.rs:38:26: 38:50 note: in this expansion of vec! (defined in <std macros>)
src/wad/image.rs:38:31: 38:33 help: add #![feature(negate_unsigned)] to the crate attributes to enable
error: aborting due to previous error
Could not compile `wad`.

Note: in 1.4 beta, it gives the following message:

   Compiling wad v0.0.1 (file:///home/edward-san/doom-rust)
src/wad/image.rs:38:31: 38:33 warning: unary negation of unsigned integers will be feature gated in the future
src/wad/image.rs:38         let mut pixels = vec![-1; width * height];
                                                  ^~
src/wad/image.rs:38:26: 38:50 note: in this expansion of vec! (defined in <std macros>)

Thanks for filing the issue! It should be fixed by d8a2dc9 , let me know if you run into any more trouble.