Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brson opened this issue Jan 13, 2017 · 1 comment
Closed

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

brson opened this issue Jan 13, 2017 · 1 comment
Assignees
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@brson
Copy link
Contributor

brson commented Jan 13, 2017

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

@brson brson added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Jan 13, 2017
@jseyfried jseyfried self-assigned this Jan 13, 2017
@jseyfried
Copy link
Contributor

Fixed in #39077.

@brson brson closed this as completed Jan 19, 2017
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 20, 2017
Improve the warning cycle for `use $crate;`

Fixes rust-lang#39049.
r? @nrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

2 participants