Skip to content

Disabling non-standard tokens causes panic #19043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Lysxia opened this issue Jan 27, 2025 · 0 comments · Fixed by #19045
Closed

Disabling non-standard tokens causes panic #19043

Lysxia opened this issue Jan 27, 2025 · 0 comments · Fixed by #19045
Assignees
Labels
C-bug Category: bug

Comments

@Lysxia
Copy link

Lysxia commented Jan 27, 2025

rust-analyzer version: rust-analyzer version: 0.3.2282-standalone [/home/sam/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2282-linux-x64/server/rust-analyzer]

rustc version: rustc 1.82.0-nightly

editor or extension: VSCode (version 0.3.2282)

relevant settings: Unchecked all options under "Rust-analyzer > Semantic Highlighting" (enabled by default: operator, string, doc>comment>inject, non-standard tokens). Reenabling "non-standard tokens" avoids the crash.

Log from "Output" window

thread 'Worker' panicked at crates/rust-analyzer/src/lsp/semantic_tokens.rs:259:53:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: rust_analyzer::lsp::to_proto::semantic_tokens
   5: rust_analyzer::handlers::request::handle_semantic_tokens_full
   6: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 1:33:31 PM] Request textDocument/semanticTokens/full failed.
  Message: request handler panicked: called `Option::unwrap()` on a `None` value
  Code: -32603 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants