Closed
Description
fn main() {
let s = "x";
assert!(s, "x")
}
According to IRC and rusti this isn't repro on builds from 2days ago, it's repro on master from today: rustc 0.12.0-pre (2ffccb76c 2014-07-22 16:11:14 +0000)
<std macros>:8:12: 836:14 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', /<snip>/rust/src/libsyntax/lib.rs:1
stack backtrace:
1: 0x10a7e3aa0 - rt::backtrace::imp::write::hd7d4c392a36e3b9e3fq
2: 0x10a7e7025 - failure::on_fail::h8404f3cd3c77692bmwq
3: 0x10aa80e09 - unwind::begin_unwind_inner::h8c77354846a1c41cYXd
4: 0x10aa80979 - unwind::begin_unwind_fmt::h4765609ebe25027d7Ud
5: 0x10aa80781 - rust_begin_unwind
6: 0x10aacebbe - failure::begin_unwind::h193e3d158c8de7d0Esj
7: 0x10aad5639 - failure::fail_bounds_check::hda72a0433634cad2Qqj
8: 0x108b460ac - codemap::FileMap::get_line::hc76ee3b96dcc58be49B
9: 0x108b51d56 - diagnostic::emit::h2ef32dd5a1fa2162rxD
10: 0x108b4e018 - diagnostic::EmitterWriter.Emitter::emit::h3363f5fc98fed7f3qtD
11: 0x108b4bf7e - diagnostic::Handler::emit::hb7f53138b989e30fdbD
12: 0x108b44025 - diagnostic::SpanHandler::span_err::h558d1077eaa5eb2du0C
13: 0x107c2f3d7 - middle::typeck::infer::InferCtxt<'a>::type_error_message_str_with_expected::hf3a5ea93ee8e997aRqb
14: 0x107cd77a0 - middle::typeck::infer::InferCtxt<'a>::type_error_message::h2ef5e1f7d553609ezyb
15: 0x107ce7f10 - middle::typeck::check::check_expr_with_unifier::check_user_unop::closure.$x22closure$x22$LP$124870$RP$
16: 0x107ce5e86 - middle::typeck::check::check_expr_with_unifier::lookup_op_method::hf7437403612d6c05pDT
17: 0x107ce7ceb - middle::typeck::check::check_expr_with_unifier::check_user_unop::he2a51680c0a9174dgST
18: 0x107ce01b2 - middle::typeck::check::check_expr_with_unifier::he7bd243d8859f79bEpT
19: 0x107cdd0e2 - middle::typeck::check::check_expr_with_unifier::he7bd243d8859f79bEpT
20: 0x107ca8216 - middle::typeck::check::check_block_with_expected::hb08cd2b6ca38b5a4GuV
21: 0x107ca399d - middle::typeck::check::check_fn::h0e1de9cd6b78a7a6CGQ
22: 0x107ca3332 - middle::typeck::check::check_bare_fn::h5b346f297b024120dwQ
23: 0x107c9c402 - middle::typeck::check::check_item::h5e573131626cb5caQ4Q
24: 0x107ca30ad - middle::typeck::check::check_item_types::he3cf518bb025f812vvQ
25: 0x107e8eb2c - middle::typeck::check_crate::h0f410da8d6c496badOh
26: 0x107f62e49 - driver::driver::phase_3_run_analysis_passes::hba3c6c5b504fe218Lkw
27: 0x107f5dc16 - driver::driver::compile_input::h172f40afa8c5e7d6q6v
28: 0x108005f83 - driver::run_compiler::h11c19b472aaa0f08Dgz
29: 0x1080038a6 - driver::main_args::closure.$x22closure$x22$LP$138131$RP$
30: 0x1080163db - task::TaskBuilder<S>::try_future::closure.$x22closure$x22$LP$139275$RP$
31: 0x1080162c6 - task::TaskBuilder<S>::spawn_internal::closure.$x22closure$x22$LP$139252$RP$
32: 0x10767987c - task::spawn_opts::closure.$x22closure$x22$LP$8299$RP$
33: 0x10aae5d8c - rust_try
34: 0x10aa7db4b - unwind::try::hcf31d7fcff740d283Ld
35: 0x10aa7d8b3 - task::Task::run::h1882bc75d327db00VXc
36: 0x107679711 - task::spawn_opts::closure.$x22closure$x22$LP$8244$RP$
37: 0x10aa7fba6 - thread::thread_start::haae59359e4020c83tkd
38: 0x7fff8e190899 - _pthread_body
39: 0x7fff8e19072a - _pthread_struct_init