Skip to content

Blank import name in unresolved import warning, hematite, Rust 1.15 #39049

Closed
@brson

Description

@brson

https://github.com/PistonDevelopers/hematite 6a7bb8d067f9144003be0f629cab0004f2380535

brian@ip-10-145-43-250:/mnt2/dev⟫ rustc +beta -Vv
rustc 1.15.0-beta.3 (a035041ba 2017-01-07)
binary: rustc
commit-hash: a035041ba450ce3061d78a2bdb9c446eb5321d0d
commit-date: 2017-01-07
host: x86_64-unknown-linux-gnu
release: 1.15.0-beta.3
LLVM version: 3.9
   Compiling piston-gfx_texture v0.18.0
   Compiling piston3d-gfx_voxel v0.12.0
   Compiling hematite v0.0.12 (file:///mnt2/dev/hematite)
warning: `$crate` may not be imported
  --> src/shader.rs:39:1
   |
39 |   gfx_pipeline!( pipe {
   |  _^ starting here...
40 | |     vbuf: ::gfx::VertexBuffer<Vertex> = (),
41 | |     transform: ::gfx::Global<[[f32; 4]; 4]> = "u_projection",
42 | |     view: ::gfx::Global<[[f32; 4]; 4]> = "u_view",
43 | |     color: ::gfx::TextureSampler<[f32; 4]> = "s_texture",
44 | |     out_color: ::gfx::RenderTarget<::gfx::format::Srgba8> = "out_color",
45 | |     out_depth: ::gfx::DepthTarget<::gfx::format::DepthStencil> =
46 | |         ::gfx::preset::depth::LESS_EQUAL_WRITE,
47 | | });
   | |___^ ...ending here
   |
   = note: `use $crate;` was erroneously allowed and will become a hard error in a future release
   = note: this error originates in a macro outside of the current crate

error[E0432]: unresolved import ``
  --> src/shader.rs:39:1
   |
39 |   gfx_pipeline!( pipe {
   |  _^ starting here...
40 | |     vbuf: ::gfx::VertexBuffer<Vertex> = (),
41 | |     transform: ::gfx::Global<[[f32; 4]; 4]> = "u_projection",
42 | |     view: ::gfx::Global<[[f32; 4]; 4]> = "u_view",
43 | |     color: ::gfx::TextureSampler<[f32; 4]> = "s_texture",
44 | |     out_color: ::gfx::RenderTarget<::gfx::format::Srgba8> = "out_color",
45 | |     out_depth: ::gfx::DepthTarget<::gfx::format::DepthStencil> =
46 | |         ::gfx::preset::depth::LESS_EQUAL_WRITE,
47 | | });
   | |___^ ...ending here: no `` in the root
   |
   = note: this error originates in a macro outside of the current crate

error: aborting due to previous error

error: Could not compile `hematite`.

To learn more, run the command again with --verbose.

Notice that the name of the import is blank.

Interestingly on nightly this is not an error, but a warning, and the import is not blank but '$':

warning: unused import: `$`, #[warn(unused_imports)] on by default
  --> src/shader.rs:39:1
   |

I guess it would be best if beta had the same behavior as nightly.

cc @jseyfried

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions