Stream: t-compiler/rust-analyzer

Topic: maybe a bug?

Charles Lew (Feb 01 2020 at 03:30, on Zulip):

Hello, i'm not sure whether others can reproduce this, but when writing a proc-macro crate (proc-macro = true) the type hints and auto completions all disappear.

std::Veetaha (Feb 01 2020 at 09:28, on Zulip):

Hmm, can you open the lsp output? Because I caught a panic from rust-analyzer, though my build of rust-analyzer is not up-to-date.
pasted image

std::Veetaha (Feb 01 2020 at 09:42, on Zulip):

Hmm, its hard to tell what causes it, here is the full backtrace:

thread '<unnamed>' panicked at 'index out of bounds: the len is 1 but the index is 2', /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/slice/
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/
   4: core::fmt::write
             at src/libcore/fmt/
   5: std::io::Write::write_fmt
             at src/libstd/io/
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/
   9: std::panicking::default_hook
             at src/libstd/
  10: std::panicking::rust_panic_with_hook
             at src/libstd/
  11: std::panicking::continue_panic_fmt
             at src/libstd/
  12: rust_begin_unwind
             at src/libstd/
  13: core::panicking::panic_fmt
             at src/libcore/
  14: core::panicking::panic_bounds_check
             at src/libcore/
  15: ra_ide::line_index::LineIndex::offset
  16: ra_lsp_server::main_loop::handlers::handle_code_action
  17: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Charles Lew (Feb 02 2020 at 12:01, on Zulip):

Hi, i think the problem here is a little flaky. i cannot always reproduce the main issue. However i can always reproduce a small fraction of it. So i created an issue for the separate smaller issue.

Last update: Jul 28 2021 at 04:15UTC