Skip to content

rustc panicked at byte index 4 is out of bounds of #41652

Closed
@messense

Description

@messense

I tried this code:

sozu-proxy/sozu#173

rustc --version --verbose:

rustc 1.19.0-nightly (afa1240e5 2017-04-29)
binary: rustc
commit-hash: afa1240e57330d85a372db4e28cd8bc8fa528ccb
commit-date: 2017-04-29
host: x86_64-apple-darwin
release: 1.19.0-nightly
LLVM version: 4.0

Backtrace:

   Compiling sozu-lib v0.2.0 (file:///Users/messense/Projects/sozu/lib)
error: no method named `deserialize` found for type `D` in the current scope
   --> lib/src/messages.rs:208:18
    |
208 |     deserializer.deserialize(OrderFieldVisitor)
    |                  ^^^^^^^^^^^
    |
    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'byte index 4 is out of bounds of ``', src/libcore/str/mod.rs:2162
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::str::slice_error_fail
   9: rustc_errors::emitter::EmitterWriter::emit_message_default
  10: <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit
  11: rustc_errors::diagnostic_builder::DiagnosticBuilder::emit
  12: rustc_typeck::check::method::suggest::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::report_method_error
  13: rustc_typeck::check::FnCtxt::check_expr_kind
  14: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref
  15: rustc_typeck::check::FnCtxt::check_block_with_expected::{{closure}}
  16: rustc_typeck::check::FnCtxt::check_block_with_expected
  17: rustc_typeck::check::FnCtxt::check_expr_kind
  18: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref
  19: rustc_typeck::check::FnCtxt::check_return_expr
  20: rustc_typeck::check::check_fn
  21: rustc_typeck::check::typeck_tables_of
  22: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  23: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  24: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  25: rustc_typeck::check::typeck_item_bodies
  26: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  27: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  28: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  29: rustc_typeck::check_crate
  30: rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}
  31: rustc_driver::driver::phase_3_run_analysis_passes
  32: rustc_driver::driver::compile_input
  33: rustc_driver::run_compiler
  34: std::panicking::try::do_call
  35: __rust_maybe_catch_panic
  36: <F as alloc::boxed::FnBox<A>>::call_box
  37: std::sys::imp::thread::Thread::new::thread_start
  38: _pthread_body
  39: _pthread_start

error: Could not compile `sozu-lib`.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions