Closed Rot127 closed 7 months ago
Hi, can you test using VS Code or a binary from https://github.com/rust-lang/rust-analyzer/releases? Or include the generated bindings.rs
in your sample?
Actually I have no longer the problem. No idea why. Thanks for looking at it though
Might have been fixed by https://github.com/rust-lang/rust-analyzer/pull/16041 if you have wide / non-Latin characters somewhere in there.
Possible. It's a pretty big code base. Thanks again.
rust-analyzer
panics for me after a few seconds use, if the workspace uses bindings (generated by bindgen inbuild.rs
).Steps to reproduce:
cargo build
(I guess)A/src/lib.rs
in editor and do some fixes (I add and replace the lifetimes).Work around
If the include (
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
) of the bindings is removed, it seems to work fine.rust-analyzer version: rust-analyzer 1.74.0 (79e9716 2023-11-13)
rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)
relevant settings: -
Logs and src
Log
``` 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "Panic context:\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "> fetch_native_diagnostics\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "thread 'Worker' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/line-index-0.1.0-pre.1/src/lib.rs:148:35:\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "invalid offset\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "stack backtrace:\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "Panic context:\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "> fetch_native_diagnostics\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "thread 'Worker' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/line-index-0.1.0-pre.1/src/lib.rs:148:35:\n" 2023-11-30T23:31:59.315 helix_lsp::transport [ERROR] rust-analyzer err <- "invalid offset\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " 0: rust_begin_unwind\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " 1: core::panicking::panic_fmt\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " 2: core::panicking::panic_display\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:168:5\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " 3: core::panicking::panic_str\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:152:5\n" 2023-11-30T23:31:59.324 helix_lsp::transport [ERROR] rust-analyzer err <- " 4: core::option::expect_failed\n" 2023-11-30T23:31:59.325 helix_lsp::transport [ERROR] rust-analyzer err <- " at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/option.rs:1988:5\n" 2023-11-30T23:31:59.325 helix_lsp::transport [ERROR] rust-analyzer err <- " 5:Minimal example: buggy.zip