rust-analyzer/rust-analyzer.github.io

Mouseover for RustAnalyzer not working in VSCode.

Nucl3arSn3k opened this issue · 3 comments

After fixing my rust analyzer install, mouseover doesn't work for showing me the details of what type a variable is. I've tried disabling and reenabling it, and I've also tried reinstalling the rust analyzer executable as well as the extension. What else can I do to fix this?

I'm also getting this error,which could be related.
[ERROR rust_analyzer::dispatch] unknown request: Request { id: RequestId(I32(14)), method: "rust-analyzer/fetchDependencyList", params: Object {} }

I suspect you have a mismatched extension and server binary. Did you set rust-analyzer.server.path? The extension comes with a bundled server, and you don't need to change it on the major platforms.

If that doesn't fix it, please file an issue in the proper repository and include the required information (version, settings, code sample etc.).

c-git commented

I'm getting a similar error and I don't know why or what is triggering it. I've been getting it for a few days and mostly ignoring it but figured might be worthwhile mentioning it. Only rust code I've been working on recently has been my Shuttle CCH Solutions so I'm not sure if it's related to that code specifically or a new RA. Putting a copy of the log below, happy to provide more info as needed.

Panic context:
> 
version: 0.3.1766-standalone
request: textDocument/hover HoverParams {
    text_document: TextDocumentIdentifier {
        uri: Url {
            scheme: "file",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: None,
            port: None,
            path: "/home/one/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs",
            query: None,
            fragment: None,
        },
    },
    position: Position(
        Position {
            line: 364,
            character: 11,
        },
    ),
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
}

thread 'Worker' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/line-index-0.1.0-pre.1/src/lib.rs:148:35:
invalid offset
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:168:5
   3: core::panicking::panic_str
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:152:5
   4: core::option::expect_failed
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/option.rs:1988:5
   5: rust_analyzer::lsp::to_proto::range
   6: rust_analyzer::lsp::to_proto::location_from_nav
   7: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
   8: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
   9: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  10: rust_analyzer::handlers::request::handle_hover
  11: std::panicking::try
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 17:07:45] Request textDocument/hover failed.
  Message: request handler panicked: invalid offset
  Code: -32603