Closed Johnson-A closed 7 years ago
It seems that newest rust nightly don't support use $crate
in macros, but unfortunately, gfx v0.12.0
, which piston2d-gfx_graphics v0.33.1
depends on, do so. In src/macros/pso.rs:
205 #[macro_export]
206 macro_rules! gfx_pipeline_base {
207 ($module:ident {
208 $( $field:ident: $ty:ty, )*
209 }) => {
210 pub mod $module {
211 use $crate;
212 #[allow(unused_imports)]
213 use super::*;
214 gfx_pipeline_inner!{ $(
215 $field: $ty,
216 )*}
217 }
218 }
219 }
To workaround, simply delete the line use $crate
in.
Of course, we should fix it permanently, but the difficulty is, the newest gfx's structure is never like 0.12.x
at all, it doesn't even expose these macros now(these macros is now at a sub directory of gfx as a sub crate). We should work out a better way to get out of it.
Thanks for this issue, going to close this in favour of tracking at PistonDevelopers/gfx_graphics#313.
piston2d-gfx_graphics v0.33.1
fails to compile withrustc 1.15.0-nightly (ba872f270 2016-11-17)
giving the following error message compiler_error.txtThere are two additional warnings:
$crate may not be imported
on each error. Is this a problem with the way the crate has been implemented? I say this because there was a compile error on the previous version that seemed very similar #308