#[macro_use]
on use
broken with gfx-rs
#52798
Labels
A-edition-2018-lints
Area: lints supporting the 2018 edition
S-needs-repro
Status: This issue has no reproduction and needs a reproduction to make progress.
With rust 2015 we can do this:
But it's 2018 so we should deal with this warning:
OK, lets give it a try.
Oops!
Looks like it wants me to import some macros which are used internally by the one that I called. Surely that's a bug in itself. Lets try and work around it though!
Two iterations later, we have
#[macro_use] use gfx::{gfx_defines, gfx_pipeline, gfx_vertex_struct_meta, gfx_impl_struct_meta, gfx_pipeline_inner};
and an odd message.Cargo suggests running with
-Z external-macro-backtrace
, but then complains that no such-Z
flag exists (yes, this is a nightly build). I guessed that I should really be passing that flag to rustc and not cargo, so I triedRUSTFLAGS="-Z external-macro-backtrace" cargo run
and got the info I was looking for.The ASCII art is beautiful. But I still have no clue what is going on, especially considering that this was working fine when I was doing
#[macro_use] extern crate gfx;
.for _ in 0 .. 1 { }
appears to be a fully valid construct when it appears anywhere else but here.version info:
gfx crate is at
0.17.1
The text was updated successfully, but these errors were encountered: