Skip to content

<std macros>:8:12: 95:21 error: cannot apply unary operator ! to type &'static str, then compiler error #17996

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
crispweed opened this issue Oct 13, 2014 · 1 comment

Comments

@crispweed
Copy link

When I try running the tests for rust-doom, I get the following:

~/rust/projects/doom $ cargo test
   Compiling toml v0.1.0 (https://github.com/alexcrichton/toml-rs#8a3ba4c6)
   Compiling khronos_api v0.0.1 (https://github.com/bjz/gl-rs#feed7be3)
   Compiling rust-xml v0.1.0 (https://github.com/netvl/rust-xml#f86f02b3)
   Compiling sdl2 v0.0.1-alpha.1 (https://github.com/cristicbz/rust-sdl2?ref=static_to_const#c8c36cb6)
   Compiling gl_generator v0.0.1 (https://github.com/bjz/gl-rs#feed7be3)
   Compiling gl v0.0.1 (https://github.com/bjz/gl-rs#feed7be3)
   Compiling rs-doom v0.0.7 (file:///home/thomas/rust/projects/doom)
<std macros>:8:12: 95:21 error: cannot apply unary operator `!` to type `&'static str`
<std macros>:8         if !$cond {
<std macros>:9             fail!($($arg),+)
<std macros>:10         }
<std macros>:11     );
<std macros>:12 )
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 12 but the index is 12', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/lib.rs:1


Could not compile `rs-doom`.

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

This is on Linux Mint 17, x64.

~/rust $ rustc --version
rustc 0.13.0-nightly (adb44f53d 2014-10-12 00:07:15 +0000)

There's no error when just building the project, this only occurs when running the tests.
I'm new to rust and couldn't see how to add RUST_BACKTRACE=1 in the context of running tests, or how to compile files individually with the same compiler settings as for cargo test in order to narrow the problem down..

@alexcrichton
Copy link
Member

Closing as a dupe of #14091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants