Skip to content

inlay hint produced an empty text edit #19646

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
roife opened this issue Apr 21, 2025 · 0 comments · Fixed by #19647
Closed

inlay hint produced an empty text edit #19646

roife opened this issue Apr 21, 2025 · 0 comments · Fixed by #19647
Assignees
Labels
A-inlay-hints inlay/inline hints C-bug Category: bug

Comments

@roife
Copy link
Member

roife commented Apr 21, 2025

thread 'main' panicked at crates/ide/src/inlay_hints.rs:320:13:
inlay hint produced an empty text edit
stack backtrace:
   0: rust_begin_unwind
             at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/panicking.rs:695:5
   1: core::panicking::panic_fmt
             at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/panicking.rs:75:14
   2: ide::inlay_hints::InlayHintsConfig::lazy_text_edit
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/inlay_hints.rs:320:13
   3: ide::inlay_hints::closure_ret::hints
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/inlay_hints/closure_ret.rs:65:14
   4: ide::inlay_hints::hints
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/inlay_hints.rs:236:25
   5: ide::inlay_hints::inlay_hints::{{closure}}
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/inlay_hints.rs:105:13
   6: ide::inlay_hints::inlay_hints
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/inlay_hints.rs:116:9
   7: ide::Analysis::inlay_hints::{{closure}}
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/lib.rs:460:27
   8: ide::Analysis::with_db::{{closure}}
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/lib.rs:870:29
   9: std::panicking::try::do_call
             at /Users/jonkelley/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:587:40
  10: std::panicking::try
             at /Users/jonkelley/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:550:19
  11: std::panic::catch_unwind
             at /Users/jonkelley/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  12: salsa::cancelled::Cancelled::catch
             at /Users/jonkelley/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/salsa-0.19.0/src/cancelled.rs:36:15
  13: ide::Analysis::with_db
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/lib.rs:870:9
  14: ide::Analysis::inlay_hints
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/ide/src/lib.rs:460:9
  15: rust_analyzer::cli::analysis_stats::<impl rust_analyzer::cli::flags::AnalysisStats>::run_ide_things
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/rust-analyzer/src/cli/analysis_stats.rs:1130:17
  16: rust_analyzer::cli::analysis_stats::<impl rust_analyzer::cli::flags::AnalysisStats>::run
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/rust-analyzer/src/cli/analysis_stats.rs:334:13
  17: rust_analyzer::actual_main
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/rust-analyzer/src/bin/main.rs:80:55
  18: rust_analyzer::main
             at /Users/jonkelley/Development/Tinkering/rust-analyzer/crates/rust-analyzer/src/bin/main.rs:38:9
  19: core::ops::function::FnOnce::call_once
             at /Users/jonkelley/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This panic occurs frequently for me...

Originally posted by @jkelleyrtp in #19552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inlay-hints inlay/inline hints C-bug Category: bug
Projects
None yet
1 participant