rust-lang / rust-lang/rust-analyzer

highlight: panic: `assertion failed: dest.get(key).is_none_or(|dst| dst == src)`

Open
#23,024 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-ty C-bug I-panic
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

requires debug assertions!

The following code

//@ edition:2018

async fn fun() {
    [1; ().await];
    //~^ error: `await` is only allowed inside `async` functions and blocks
}

fn main() {}

crashes rust-analyzer highlight:


thread 'main' (1470681) panicked at src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1481:9:
assertion failed: dest.get(key).is_none_or(|dst| dst == src)
stack backtrace:
   0:     0x7f1a4b9fb590 - std[5bc4b08caa256f6e]::backtrace_rs::backtrace::libunwind::trace
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
   1:     0x7f1a4b9fb590 - std[5bc4b08caa256f6e]::backtrace_rs::backtrace::trace_unsynchronized::<std[5bc4b08caa256f6e]::sys::backtrace::_print_fmt::{closure#1}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
   2:     0x7f1a4b9fb590 - std[5bc4b08caa256f6e]::sys::backtrace::_print_fmt
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/sys/backtrace.rs:74:9
   3:     0x7f1a4b9fb590 - <<std[5bc4b08caa256f6e]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[3b1b85d11538b91a]::fmt::Display>::fmt
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/sys/backtrace.rs:44:26
   4:     0x7f1a472703ae - <core[3b1b85d11538b91a]::fmt::rt::Argument>::fmt
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/fmt/rt.rs:152:76
   5:     0x7f1a472703ae - core[3b1b85d11538b91a]::fmt::write
   6:     0x7f1a4ba1250c - core[3b1b85d11538b91a]::io::write::default_write_fmt::<std[5bc4b08caa256f6e]::sys::stdio::unix::Stderr>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/io/write.rs:402:11
   7:     0x7f1a4ba1250c - <std[5bc4b08caa256f6e]::sys::stdio::unix::Stderr as core[3b1b85d11538b91a]::io::write::Write>::write_fmt
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/io/write.rs:335:13
   8:     0x7f1a4b9ba664 - <std[5bc4b08caa256f6e]::sys::backtrace::BacktraceLock>::print
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/sys/backtrace.rs:47:9
   9:     0x7f1a4b9ba664 - std[5bc4b08caa256f6e]::panicking::default_hook::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:292:27
  10:     0x7f1a4b9e7a21 - std[5bc4b08caa256f6e]::panicking::default_hook
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:319:9
  11:     0x7f1a4b9e7e73 - std[5bc4b08caa256f6e]::panicking::panic_with_hook
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:815:13
  12:     0x7f1a4b9ba764 - std[5bc4b08caa256f6e]::panicking::panic_handler::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:681:13
  13:     0x7f1a4b9aaa49 - std[5bc4b08caa256f6e]::sys::backtrace::__rust_end_short_backtrace::<std[5bc4b08caa256f6e]::panicking::panic_handler::{closure#0}, !>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/sys/backtrace.rs:182:18
  14:     0x7f1a4b9bc70d - __rustc[ec65f6bfcd0b8ba6]::rust_begin_unwind
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:679:5
  15:     0x7f1a4727111c - core[3b1b85d11538b91a]::panicking::panic_fmt
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/panicking.rs:80:14
  16:     0x7f1a472710e2 - core[3b1b85d11538b91a]::panicking::panic
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/panicking.rs:150:5
  17:     0x5559293f23c5 - <hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge::merge_hash_maps::<hir_ty[78931ef0f3460e2e]::db::InternedOpaqueTyId, hir_ty[78931ef0f3460e2e]::next_solver::ty::StoredTy>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1507:21
  18:     0x5559293f23c5 - <hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1481:9
  19:     0x5559294107df - <hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge_anon_consts::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1583:18
  20:     0x5559294107df - <thin_vec[3d55902fea1ec590]::ThinVec<hir_ty[78931ef0f3460e2e]::db::AnonConstId>>::retain::<<hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge_anon_consts::{closure#0}>::{closure#0}
                               at /rust/deps/thin-vec-0.2.18/src/lib.rs:1307:29
  21:     0x5559294107df - <thin_vec[3d55902fea1ec590]::ThinVec<hir_ty[78931ef0f3460e2e]::db::AnonConstId>>::retain_mut::<<thin_vec[3d55902fea1ec590]::ThinVec<hir_ty[78931ef0f3460e2e]::db::AnonConstId>>::retain<<hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge_anon_consts::{closure#0}>::{closure#0}>
                               at /rust/deps/thin-vec-0.2.18/src/lib.rs:1341:21
  22:     0x5559294107df - <thin_vec[3d55902fea1ec590]::ThinVec<hir_ty[78931ef0f3460e2e]::db::AnonConstId>>::retain::<<hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge_anon_consts::{closure#0}>
                               at /rust/deps/thin-vec-0.2.18/src/lib.rs:1307:14
  23:     0x5559294107df - <hir_ty[78931ef0f3460e2e]::infer::InferenceContext>::merge_anon_consts
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1576:29
  24:     0x5559294107df - hir_ty[78931ef0f3460e2e]::infer::infer_finalize
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:269:9
  25:     0x55592941b370 - hir_ty[78931ef0f3460e2e]::infer::infer_query_with_inspect
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:186:5
  26:     0x5559292a94d3 - hir_ty[78931ef0f3460e2e]::infer::infer_query
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:123:5
  27:     0x5559292a94d3 - <hir_ty[78931ef0f3460e2e]::infer::InferenceResult as <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::InnerTrait_>::for_body_
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1045:9
  28:     0x5559292a94d3 - <<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_ as salsa[6c1f8f7ff407531b]::function::Configuration>::execute::inner_
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1041:1
  29:     0x5559292a94d3 - <<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_ as salsa[6c1f8f7ff407531b]::function::Configuration>::execute
                               at /rust/deps/salsa-macro-rules-0.27.2/src/setup_tracked_fn.rs:338:21
  30:     0x5559292a94d3 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::execute_query
                               at /rust/deps/salsa-0.27.2/src/function/execute.rs:330:25
  31:     0x5559292a94d3 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::execute_maybe_iterate
                               at /rust/deps/salsa-0.27.2/src/function/execute.rs:170:49
  32:     0x5559292a94d3 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::execute
                               at /rust/deps/salsa-0.27.2/src/function/execute.rs:74:22
  33:     0x555928fbb003 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::fetch_cold
                               at /rust/deps/salsa-0.27.2/src/function/fetch.rs:150:14
  34:     0x555928fbb003 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::refresh_memo
                               at /rust/deps/salsa-0.27.2/src/function/fetch.rs:69:38
  35:     0x555928fbb003 - <salsa[6c1f8f7ff407531b]::function::IngredientImpl<<hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::fetch
                               at /rust/deps/salsa-0.27.2/src/function/fetch.rs:29:25
  36:     0x555928fbb003 - <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}
                               at /rust/deps/salsa-macro-rules-0.27.2/src/setup_tracked_fn.rs:108:66
  37:     0x555928fbb003 - <salsa[6c1f8f7ff407531b]::attach::Attached>::attach::<dyn hir_ty[78931ef0f3460e2e]::db::HirDatabase, &hir_ty[78931ef0f3460e2e]::infer::InferenceResult, <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}>
                               at /rust/deps/salsa-0.27.2/src/attach.rs:88:9
  38:     0x555928b96803 - salsa[6c1f8f7ff407531b]::attach::attach::<&hir_ty[78931ef0f3460e2e]::infer::InferenceResult, dyn hir_ty[78931ef0f3460e2e]::db::HirDatabase, <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}>::{closure#0}
                               at /rust/deps/salsa-0.27.2/src/attach.rs:178:15
  39:     0x555928b96803 - <std[5bc4b08caa256f6e]::thread::local::LocalKey<salsa[6c1f8f7ff407531b]::attach::Attached>>::try_with::<salsa[6c1f8f7ff407531b]::attach::attach<&hir_ty[78931ef0f3460e2e]::infer::InferenceResult, dyn hir_ty[78931ef0f3460e2e]::db::HirDatabase, <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}>::{closure#0}, &hir_ty[78931ef0f3460e2e]::infer::InferenceResult>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/thread/local.rs:464:12
  40:     0x555928b96803 - <std[5bc4b08caa256f6e]::thread::local::LocalKey<salsa[6c1f8f7ff407531b]::attach::Attached>>::with::<salsa[6c1f8f7ff407531b]::attach::attach<&hir_ty[78931ef0f3460e2e]::infer::InferenceResult, dyn hir_ty[78931ef0f3460e2e]::db::HirDatabase, <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}>::{closure#0}, &hir_ty[78931ef0f3460e2e]::infer::InferenceResult>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/thread/local.rs:428:20
  41:     0x555928b96803 - salsa[6c1f8f7ff407531b]::attach::attach::<&hir_ty[78931ef0f3460e2e]::infer::InferenceResult, dyn hir_ty[78931ef0f3460e2e]::db::HirDatabase, <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_::{closure#0}>
                               at /rust/deps/salsa-0.27.2/src/attach.rs:176:14
  42:     0x555928b96803 - <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body::for_body_
                               at /rust/deps/salsa-macro-rules-0.27.2/src/setup_tracked_fn.rs:98:13
  43:     0x555928b96803 - <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::for_body
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1041:1
  44:     0x555928b96803 - <hir_ty[78931ef0f3460e2e]::infer::InferenceResult>::of::<hir_def[2230ff9d733fbddc]::DefWithBodyId>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs:1069:47
  45:     0x555928b96803 - <hir[a2439b282a3ea4b8]::semantics::SemanticsImpl>::with_all_infers_for_store
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir/src/semantics.rs:2255:26
  46:     0x555928b96803 - <hir[a2439b282a3ea4b8]::semantics::SemanticsImpl>::get_unsafe_ops
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir/src/semantics.rs:1981:14
  47:     0x5559296e0a88 - ide[7522228baa251e9a]::syntax_highlighting::traverse::{closure#2}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting.rs:430:41
  48:     0x5559296e0a88 - <std[5bc4b08caa256f6e]::collections::hash::map::Entry<hir[a2439b282a3ea4b8]::ExpressionStoreOwner, std[5bc4b08caa256f6e]::collections::hash::set::HashSet<hir_expand[9654e838fa00278c]::files::InFileWrapper<hir_expand[9654e838fa00278c]::HirFileId, syntax[6646cc4621a7f916]::ptr::AstPtr<either[3c6a38dcf30a9887]::Either<syntax[6646cc4621a7f916]::ast::generated::nodes::Expr, syntax[6646cc4621a7f916]::ast::generated::nodes::Pat>>>, rustc_hash[cd761141b251c21a]::FxBuildHasher>>>::or_insert_with::<ide[7522228baa251e9a]::syntax_highlighting::traverse::{closure#2}>::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/collections/hash/map.rs:2541:55
  49:     0x5559296e0a88 - <std[5bc4b08caa256f6e]::collections::hash::map::Entry<hir[a2439b282a3ea4b8]::ExpressionStoreOwner, std[5bc4b08caa256f6e]::collections::hash::set::HashSet<hir_expand[9654e838fa00278c]::files::InFileWrapper<hir_expand[9654e838fa00278c]::HirFileId, syntax[6646cc4621a7f916]::ptr::AstPtr<either[3c6a38dcf30a9887]::Either<syntax[6646cc4621a7f916]::ast::generated::nodes::Expr, syntax[6646cc4621a7f916]::ast::generated::nodes::Pat>>>, rustc_hash[cd761141b251c21a]::FxBuildHasher>>>::or_try_insert_with::<<std[5bc4b08caa256f6e]::collections::hash::map::Entry<hir[a2439b282a3ea4b8]::ExpressionStoreOwner, std[5bc4b08caa256f6e]::collections::hash::set::HashSet<hir_expand[9654e838fa00278c]::files::InFileWrapper<hir_expand[9654e838fa00278c]::HirFileId, syntax[6646cc4621a7f916]::ptr::AstPtr<either[3c6a38dcf30a9887]::Either<syntax[6646cc4621a7f916]::ast::generated::nodes::Expr, syntax[6646cc4621a7f916]::ast::generated::nodes::Pat>>>, rustc_hash[cd761141b251c21a]::FxBuildHasher>>>::or_insert_with<ide[7522228baa251e9a]::syntax_highlighting::traverse::{closure#2}>::{closure#0}, !>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/collections/hash/map.rs:2576:46
  50:     0x5559296e0a88 - <std[5bc4b08caa256f6e]::collections::hash::map::Entry<hir[a2439b282a3ea4b8]::ExpressionStoreOwner, std[5bc4b08caa256f6e]::collections::hash::set::HashSet<hir_expand[9654e838fa00278c]::files::InFileWrapper<hir_expand[9654e838fa00278c]::HirFileId, syntax[6646cc4621a7f916]::ptr::AstPtr<either[3c6a38dcf30a9887]::Either<syntax[6646cc4621a7f916]::ast::generated::nodes::Expr, syntax[6646cc4621a7f916]::ast::generated::nodes::Pat>>>, rustc_hash[cd761141b251c21a]::FxBuildHasher>>>::or_insert_with::<ide[7522228baa251e9a]::syntax_highlighting::traverse::{closure#2}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/collections/hash/map.rs:2541:14
  51:     0x5559296e0a88 - ide[7522228baa251e9a]::syntax_highlighting::traverse
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting.rs:430:18
  52:     0x5559296e0a88 - ide[7522228baa251e9a]::syntax_highlighting::highlight
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting.rs:222:5
  53:     0x555929678196 - ide[7522228baa251e9a]::syntax_highlighting::html::highlight_as_html_with_config
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/html.rs:34:21
  54:     0x555929678196 - ide[7522228baa251e9a]::syntax_highlighting::html::highlight_as_html
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/html.rs:60:5
  55:     0x555929678196 - <ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/lib.rs:779:27
  56:     0x555929678196 - <ide[7522228baa251e9a]::Analysis>::with_db::<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/lib.rs:976:70
  57:     0x555929678196 - std[5bc4b08caa256f6e]::panicking::catch_unwind::do_call::<<ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:576:43
  58:     0x555929678196 - std[5bc4b08caa256f6e]::panicking::catch_unwind::<alloc[e6aa54066faa1ed9]::string::String, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}::{closure#0}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:544:19
  59:     0x555929678196 - std[5bc4b08caa256f6e]::panic::catch_unwind::<<ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panic.rs:359:14
  60:     0x555929678196 - <salsa[6c1f8f7ff407531b]::cancelled::Cancelled>::catch::<<ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>
                               at /rust/deps/salsa-0.27.2/src/cancelled.rs:36:15
  61:     0x555929678196 - <ide[7522228baa251e9a]::Analysis>::with_db::<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/lib.rs:976:50
  62:     0x555929678196 - <hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::Attached>::attach_allow_change::<core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/interner.rs:2441:13
  63:     0x555929678196 - hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::attach_db_allow_change::<core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}>::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/interner.rs:2464:46
  64:     0x555929678196 - <std[5bc4b08caa256f6e]::thread::local::LocalKey<hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::Attached>>::try_with::<hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::attach_db_allow_change<core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}>::{closure#0}, core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/thread/local.rs:464:12
  65:     0x555929678196 - <std[5bc4b08caa256f6e]::thread::local::LocalKey<hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::Attached>>::with::<hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::attach_db_allow_change<core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}>::{closure#0}, core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/thread/local.rs:428:20
  66:     0x555929678196 - hir_ty[78931ef0f3460e2e]::next_solver::interner::tls_db::attach_db_allow_change::<core[3b1b85d11538b91a]::result::Result<alloc[e6aa54066faa1ed9]::string::String, salsa[6c1f8f7ff407531b]::cancelled::Cancelled>, <ide[7522228baa251e9a]::Analysis>::with_db<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>::{closure#0}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/hir-ty/src/next_solver/interner.rs:2464:19
  67:     0x555929678196 - <ide[7522228baa251e9a]::Analysis>::with_db::<<ide[7522228baa251e9a]::Analysis>::highlight_as_html::{closure#0}, alloc[e6aa54066faa1ed9]::string::String>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/lib.rs:976:9
  68:     0x555929678196 - <ide[7522228baa251e9a]::Analysis>::highlight_as_html
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/ide/src/lib.rs:779:14
  69:     0x55592a324cb5 - <rust_analyzer[7e5e11b2a2933d2]::cli::flags::Highlight>::run
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/highlight.rs:13:29
  70:     0x55592a59632b - rust_analyzer[adc8391f4d90bc76]::actual_main
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs:73:55
  71:     0x55592a59632b - rust_analyzer[adc8391f4d90bc76]::main
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs:32:9
  72:     0x55592a590e13 - <fn() -> core[3b1b85d11538b91a]::result::Result<std[5bc4b08caa256f6e]::process::ExitCode, anyhow[1ba1579ec8675b12]::Error> as core[3b1b85d11538b91a]::ops::function::FnOnce<()>>::call_once
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/ops/function.rs:250:5
  73:     0x55592a590e13 - std[5bc4b08caa256f6e]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[3b1b85d11538b91a]::result::Result<std[5bc4b08caa256f6e]::process::ExitCode, anyhow[1ba1579ec8675b12]::Error>, core[3b1b85d11538b91a]::result::Result<std[5bc4b08caa256f6e]::process::ExitCode, anyhow[1ba1579ec8675b12]::Error>>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/sys/backtrace.rs:166:18
  74:     0x55592a5932e2 - std[5bc4b08caa256f6e]::rt::lang_start::<core[3b1b85d11538b91a]::result::Result<std[5bc4b08caa256f6e]::process::ExitCode, anyhow[1ba1579ec8675b12]::Error>>::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/rt.rs:206:18
  75:     0x7f1a4b9e5adc - <&dyn core[3b1b85d11538b91a]::ops::function::Fn<(), Output = i32> + core[3b1b85d11538b91a]::panic::unwind_safe::RefUnwindSafe + core[3b1b85d11538b91a]::marker::Sync as core[3b1b85d11538b91a]::ops::function::FnOnce<()>>::call_once
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/core/src/ops/function.rs:287:21
  76:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panicking::catch_unwind::do_call::<&dyn core[3b1b85d11538b91a]::ops::function::Fn<(), Output = i32> + core[3b1b85d11538b91a]::panic::unwind_safe::RefUnwindSafe + core[3b1b85d11538b91a]::marker::Sync, i32>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:576:43
  77:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panicking::catch_unwind::<i32, &dyn core[3b1b85d11538b91a]::ops::function::Fn<(), Output = i32> + core[3b1b85d11538b91a]::panic::unwind_safe::RefUnwindSafe + core[3b1b85d11538b91a]::marker::Sync>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:544:19
  78:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panic::catch_unwind::<&dyn core[3b1b85d11538b91a]::ops::function::Fn<(), Output = i32> + core[3b1b85d11538b91a]::panic::unwind_safe::RefUnwindSafe + core[3b1b85d11538b91a]::marker::Sync, i32>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panic.rs:359:14
  79:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::rt::lang_start_internal::{closure#0}
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/rt.rs:175:24
  80:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panicking::catch_unwind::do_call::<std[5bc4b08caa256f6e]::rt::lang_start_internal::{closure#0}, isize>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:576:43
  81:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panicking::catch_unwind::<isize, std[5bc4b08caa256f6e]::rt::lang_start_internal::{closure#0}>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panicking.rs:544:19
  82:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::panic::catch_unwind::<std[5bc4b08caa256f6e]::rt::lang_start_internal::{closure#0}, isize>
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/panic.rs:359:14
  83:     0x7f1a4b9e5adc - std[5bc4b08caa256f6e]::rt::lang_start_internal
                               at /rustc/504869653f510b279c542e65ccd1ea9710c119ba/library/std/src/rt.rs:171:5
  84:     0x55592a5ad8bf - main
  85:     0x7f1a45827741 - <unknown>
  86:     0x7f1a45827879 - __libc_start_main
  87:     0x555928a35939 - <unknown>
  88:                0x0 - <unknown>

version information

rust-analyzer 1.99.0-nightly (5048696 2026-08-03)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/tools/rust-analyzer/crates/hir-ty/src/infer.rs, especially InferenceContext::merge and merge_anon_consts, then reproduce the failure with the Rust snippet using rust-analyzer highlight. Done means the snippet produces its await diagnostic without triggering the assertion panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.