Stream: t-compiler/wg-rls-2.0

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 try adding extern crate proc_macro; to the top of lib.rs?

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/mod.rs:2796:10
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:61
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1028
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:65
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:50
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:188
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:205
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:464
  11: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
  12: rust_begin_unwind
             at src/libstd/panicking.rs:302
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
  14: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:96
  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. https://github.com/rust-analyzer/rust-analyzer/issues/2984

Last update: Sep 22 2020 at 00:45UTC