rust-lang / rust-lang/rust-analyzer
panic: entered unreachable code: inference diagnostic in desugared expr
Open
Nobody has claimed this yet.
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!
fn main() {
format!(r"{}{}{}", named_arg=1);
}
rust-analyzer analysis-stats . --run-all-ide-things
Database loaded: 325.87ms, 223minstr, 48mb (metadata 163.18ms, 972kinstr, 153kb; build 28.51ms, 171kinstr, 1440b)
item trees: 1
dependency lines of code: 1_478_357, item trees: 2_969
dependency item stats: traits: 860, impl: 9_717, mods: 3_002, macro calls: 5_613, macro rules: 1_062
Item Tree Collection: 2.67s, 28ginstr, 431mb
Total Statistics:
crates: 1, mods: 1, decls: 1, bodies: 1, adts: 0, consts: 0, signatures: 1, variants: 0
Workspace:
traits: 0, macro_rules macros: 0, proc_macros: 0
lines of code: 3, item trees: 1
usages: traits: 0, impl: 0, mods: 0, macro calls: 0, macro rules: 0
Dependencies:
lines of code: 1_478_357, item trees: 2_969
declarations: traits: 860, impl: 9_717, mods: 3_002, macro calls: 5_613, macro rules: 1_062
Item Collection: 1.58s, 13ginstr, 176mb
Crate lang items: 291.75ms, 2905minstr, 31mb
Expression Store Lowering: 364.94µs, 749kinstr, 71kb
exprs: 25, ??ty: 0 (0%), ?ty: 2 (8%), !ty: 0
pats: 2, ??ty: 0 (0%), ?ty: 0 (0%), !ty: 0
panics: 0
Inference: 265.20ms, 1617minstr, 37mb
MIR lowering: 81.89µs, 143kinstr, 35kb
Mir failed bodies: 1 (100%)
Data layouts: 80.00ns, 14kinstr, 0b
Failed data layouts: 0 (100%)
Const evaluation: 6.00µs, 25kinstr, -16b
Failed const evals: 0 (100%)
0/1 0% diagnostics: /tmp/im/f/src/main.rs
thread 'main' (37218) panicked at crates/hir/src/diagnostics.rs:2053:30:
internal error: entered unreachable code: inference diagnostic in desugared expr
stack backtrace:
0: 0x5649444591f1 - std[71a467343b18a2c1]::backtrace_rs::backtrace::libunwind::trace
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
1: 0x5649444591f1 - std[71a467343b18a2c1]::backtrace_rs::backtrace::trace_unsynchronized::<std[71a467343b18a2c1]::sys::backtrace::_print_fmt::{closure#1}>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
2: 0x5649444591f1 - std[71a467343b18a2c1]::sys::backtrace::_print_fmt
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/sys/backtrace.rs:74:9
3: 0x5649444591f1 - <<std[71a467343b18a2c1]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[11918ecc8322c3ee]::fmt::Display>::fmt
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/sys/backtrace.rs:44:26
4: 0x564944475e2a - <core[11918ecc8322c3ee]::fmt::rt::Argument>::fmt
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/core/src/fmt/rt.rs:152:76
5: 0x564944475e2a - core[11918ecc8322c3ee]::fmt::write
6: 0x564944462b6c - core[11918ecc8322c3ee]::io::write::default_write_fmt::<std[71a467343b18a2c1]::sys::stdio::unix::Stderr>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/core/src/io/write.rs:402:11
7: 0x564944462b6c - <std[71a467343b18a2c1]::sys::stdio::unix::Stderr as core[11918ecc8322c3ee]::io::write::Write>::write_fmt
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/core/src/io/write.rs:335:13
8: 0x56494442fee6 - <std[71a467343b18a2c1]::sys::backtrace::BacktraceLock>::print
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/sys/backtrace.rs:47:9
9: 0x56494442fee6 - std[71a467343b18a2c1]::panicking::default_hook::{closure#0}
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:289:27
10: 0x56494444ef81 - std[71a467343b18a2c1]::panicking::default_hook
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:316:9
11: 0x56494444f2ab - std[71a467343b18a2c1]::panicking::panic_with_hook
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:811:13
12: 0x56494442ffc4 - std[71a467343b18a2c1]::panicking::panic_handler::{closure#0}
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:678:13
13: 0x564944427169 - std[71a467343b18a2c1]::sys::backtrace::__rust_end_short_backtrace::<std[71a467343b18a2c1]::panicking::panic_handler::{closure#0}, !>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/sys/backtrace.rs:182:18
14: 0x564944430dcd - __rustc[3b8ba45af69cfb7c]::rust_begin_unwind
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:676:5
15: 0x5649444766fc - core[11918ecc8322c3ee]::panicking::panic_fmt
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/core/src/panicking.rs:80:14
16: 0x5649439160cf - <hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic>::inference_diagnostic
17: 0x5649439160cf - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:1296:13
18: 0x5649439388fb - <&mut <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0} as core[11918ecc8322c3ee]::ops::function::FnMut<(&hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic,)>>::call_mut
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:21
19: 0x5649439388fb - <core[11918ecc8322c3ee]::slice::iter::Iter<hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::find_map::<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic, &mut <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:361:38
20: 0x5649439388fb - <core[11918ecc8322c3ee]::iter::adapters::filter_map::FilterMap<core[11918ecc8322c3ee]::slice::iter::Iter<hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic>, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::next
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:64:19
21: 0x5649439388fb - <alloc[b37a3ff7fa4d5f32]::vec::Vec<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic>>::extend_desugared::<core[11918ecc8322c3ee]::iter::adapters::filter_map::FilterMap<core[11918ecc8322c3ee]::slice::iter::Iter<hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic>, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:4148:44
22: 0x5649439388fb - <alloc[b37a3ff7fa4d5f32]::vec::Vec<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic> as alloc[b37a3ff7fa4d5f32]::vec::spec_extend::SpecExtend<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic, core[11918ecc8322c3ee]::iter::adapters::filter_map::FilterMap<core[11918ecc8322c3ee]::slice::iter::Iter<hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic>, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}>>>::spec_extend
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:18:14
23: 0x5649439388fb - <alloc[b37a3ff7fa4d5f32]::vec::Vec<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic> as core[11918ecc8322c3ee]::iter::traits::collect::Extend<hir[c7ad7fe945aa0503]::diagnostics::AnyDiagnostic>>::extend::<core[11918ecc8322c3ee]::iter::adapters::filter_map::FilterMap<core[11918ecc8322c3ee]::slice::iter::Iter<hir_ty[c6020b5b036d7a82]::infer::InferenceDiagnostic>, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors::{closure#0}>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:4112:9
24: 0x5649439388fb - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::emit_inference_errors
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:1295:18
25: 0x564943936fc8 - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_def_with_body
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:1243:14
26: 0x5649439354e9 - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module_def
27: 0x5649439321bf - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:1148:34
28: 0x5649439321bf - core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call::<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0}
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:884:29
29: 0x5649439321bf - <&mut core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0} as core[11918ecc8322c3ee]::ops::function::FnMut<((), hir_def[b797b053043be09c]::ModuleDefId)>>::call_mut
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:21
30: 0x5649439321bf - core[11918ecc8322c3ee]::iter::adapters::copied::copy_fold::<hir_def[b797b053043be09c]::ModuleDefId, (), &mut core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0}>::{closure#0}
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/copied.rs:36:22
31: 0x5649439321bf - <core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ModuleDefId> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::fold::<(), core[11918ecc8322c3ee]::iter::adapters::copied::copy_fold<hir_def[b797b053043be09c]::ModuleDefId, (), &mut core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0}>::{closure#0}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:274:27
32: 0x5649439321bf - <core[11918ecc8322c3ee]::iter::adapters::copied::Copied<core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ModuleDefId>> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::fold::<(), &mut core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/copied.rs:81:17
33: 0x5649439321bf - <core[11918ecc8322c3ee]::iter::adapters::chain::Chain<core[11918ecc8322c3ee]::iter::adapters::copied::Copied<core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ModuleDefId>>, core[11918ecc8322c3ee]::iter::adapters::map::Map<core[11918ecc8322c3ee]::iter::adapters::copied::Copied<core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ConstId>>, hir_def[b797b053043be09c]::ModuleDefId::ConstId>> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::fold::<(), core[11918ecc8322c3ee]::iter::traits::iterator::Iterator::for_each::call<hir_def[b797b053043be09c]::ModuleDefId, <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>::{closure#0}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs:121:21
34: 0x5649439321bf - <core[11918ecc8322c3ee]::iter::adapters::chain::Chain<core[11918ecc8322c3ee]::iter::adapters::copied::Copied<core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ModuleDefId>>, core[11918ecc8322c3ee]::iter::adapters::map::Map<core[11918ecc8322c3ee]::iter::adapters::copied::Copied<core[11918ecc8322c3ee]::slice::iter::Iter<hir_def[b797b053043be09c]::ConstId>>, hir_def[b797b053043be09c]::ModuleDefId::ConstId>> as core[11918ecc8322c3ee]::iter::traits::iterator::Iterator>::for_each::<<hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module::{closure#1}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:887:14
35: 0x5649439321bf - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect_module
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:1148:14
36: 0x564943944226 - <hir[c7ad7fe945aa0503]::diagnostics::DiagnosticsCollector>::collect
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/diagnostics.rs:766:14
37: 0x564943944226 - <hir[c7ad7fe945aa0503]::Module>::diagnostics
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir/src/lib.rs:699:9
38: 0x564943389d66 - ide_diagnostics[6dc3f02d39f00f14]::semantic_diagnostics
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide-diagnostics/src/lib.rs:432:19
39: 0x564943384202 - ide_diagnostics[6dc3f02d39f00f14]::full_diagnostics
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide-diagnostics/src/lib.rs:603:16
40: 0x5649432061ed - <ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide/src/lib.rs:829:27
41: 0x5649432061ed - <ide[fb707b7c9d152f80]::Analysis>::with_db::<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}::{closure#0}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide/src/lib.rs:975:70
42: 0x5649432061ed - std[71a467343b18a2c1]::panicking::catch_unwind::do_call::<<ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:573:43
43: 0x5649432061ed - std[71a467343b18a2c1]::panicking::catch_unwind::<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}::{closure#0}>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:541:19
44: 0x5649432061ed - std[71a467343b18a2c1]::panic::catch_unwind::<<ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:359:14
45: 0x5649432061ed - <salsa[5d03113ac9f39ed2]::cancelled::Cancelled>::catch::<<ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>
at /home/matthias/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/salsa-0.28.2/src/cancelled.rs:36:15
46: 0x5649432061ed - <ide[fb707b7c9d152f80]::Analysis>::with_db::<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide/src/lib.rs:975:50
47: 0x5649432061ed - <hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::Attached>::attach_allow_change::<core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}>
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir-ty/src/next_solver/interner.rs:2482:13
48: 0x5649432061ed - hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::attach_db_allow_change::<core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}>::{closure#0}
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir-ty/src/next_solver/interner.rs:2505:46
49: 0x5649432061ed - <std[71a467343b18a2c1]::thread::local::LocalKey<hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::Attached>>::try_with::<hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::attach_db_allow_change<core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}>::{closure#0}, core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:463:12
50: 0x5649432061ed - <std[71a467343b18a2c1]::thread::local::LocalKey<hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::Attached>>::with::<hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::attach_db_allow_change<core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}>::{closure#0}, core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:427:20
51: 0x5649432061ed - hir_ty[c6020b5b036d7a82]::next_solver::interner::tls_db::attach_db_allow_change::<core[11918ecc8322c3ee]::result::Result<alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>, salsa[5d03113ac9f39ed2]::cancelled::Cancelled>, <ide[fb707b7c9d152f80]::Analysis>::with_db<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>::{closure#0}>
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/hir-ty/src/next_solver/interner.rs:2505:19
52: 0x5649432061ed - <ide[fb707b7c9d152f80]::Analysis>::with_db::<<ide[fb707b7c9d152f80]::Analysis>::full_diagnostics::{closure#0}, alloc[b37a3ff7fa4d5f32]::vec::Vec<ide_diagnostics[6dc3f02d39f00f14]::Diagnostic>>
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide/src/lib.rs:975:9
53: 0x5649432061ed - <ide[fb707b7c9d152f80]::Analysis>::full_diagnostics
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/ide/src/lib.rs:829:14
54: 0x564942d4967f - <rust_analyzer[fbb607e756b1a4f1]::cli::flags::AnalysisStats>::run_ide_things
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/rust-analyzer/src/cli/analysis_stats.rs:1354:26
55: 0x564942d4967f - <rust_analyzer[fbb607e756b1a4f1]::cli::flags::AnalysisStats>::run
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/rust-analyzer/src/cli/analysis_stats.rs:382:18
56: 0x564942a7470b - rust_analyzer[e285ded21ab2a89]::actual_main
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/rust-analyzer/src/bin/main.rs:74:59
57: 0x564942a7470b - rust_analyzer[e285ded21ab2a89]::main
at /home/matthias/vcs/github/rust-analyzer-debug-assertions/crates/rust-analyzer/src/bin/main.rs:32:9
58: 0x564942a6f6eb - <fn() -> core[11918ecc8322c3ee]::result::Result<std[71a467343b18a2c1]::process::ExitCode, anyhow[9bbca5dfff5fb2cc]::Error> as core[11918ecc8322c3ee]::ops::function::FnOnce<()>>::call_once
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
59: 0x564942a6f6eb - std[71a467343b18a2c1]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[11918ecc8322c3ee]::result::Result<std[71a467343b18a2c1]::process::ExitCode, anyhow[9bbca5dfff5fb2cc]::Error>, core[11918ecc8322c3ee]::result::Result<std[71a467343b18a2c1]::process::ExitCode, anyhow[9bbca5dfff5fb2cc]::Error>>
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:166:18
60: 0x564942a71e12 - std[71a467343b18a2c1]::rt::lang_start::<core[11918ecc8322c3ee]::result::Result<std[71a467343b18a2c1]::process::ExitCode, anyhow[9bbca5dfff5fb2cc]::Error>>::{closure#0}
at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:206:18
61: 0x56494444de28 - <&dyn core[11918ecc8322c3ee]::ops::function::Fn<(), Output = i32> + core[11918ecc8322c3ee]::panic::unwind_safe::RefUnwindSafe + core[11918ecc8322c3ee]::marker::Sync as core[11918ecc8322c3ee]::ops::function::FnOnce<()>>::call_once
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/core/src/ops/function.rs:287:21
62: 0x56494444de28 - std[71a467343b18a2c1]::panicking::catch_unwind::do_call::<&dyn core[11918ecc8322c3ee]::ops::function::Fn<(), Output = i32> + core[11918ecc8322c3ee]::panic::unwind_safe::RefUnwindSafe + core[11918ecc8322c3ee]::marker::Sync, i32>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:573:43
63: 0x56494444de28 - std[71a467343b18a2c1]::panicking::catch_unwind::<i32, &dyn core[11918ecc8322c3ee]::ops::function::Fn<(), Output = i32> + core[11918ecc8322c3ee]::panic::unwind_safe::RefUnwindSafe + core[11918ecc8322c3ee]::marker::Sync>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:541:19
64: 0x56494444de28 - std[71a467343b18a2c1]::panic::catch_unwind::<&dyn core[11918ecc8322c3ee]::ops::function::Fn<(), Output = i32> + core[11918ecc8322c3ee]::panic::unwind_safe::RefUnwindSafe + core[11918ecc8322c3ee]::marker::Sync, i32>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panic.rs:359:14
65: 0x56494444de28 - std[71a467343b18a2c1]::rt::lang_start_internal::{closure#0}
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/rt.rs:175:24
66: 0x56494444de28 - std[71a467343b18a2c1]::panicking::catch_unwind::do_call::<std[71a467343b18a2c1]::rt::lang_start_internal::{closure#0}, isize>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:573:43
67: 0x56494444de28 - std[71a467343b18a2c1]::panicking::catch_unwind::<isize, std[71a467343b18a2c1]::rt::lang_start_internal::{closure#0}>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panicking.rs:541:19
68: 0x56494444de28 - std[71a467343b18a2c1]::panic::catch_unwind::<std[71a467343b18a2c1]::rt::lang_start_internal::{closure#0}, isize>
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/panic.rs:359:14
69: 0x56494444de28 - std[71a467343b18a2c1]::rt::lang_start_internal
at /rustc/0fc141305da7a8a222f65aef1f1acc739c46282b/library/std/src/rt.rs:171:5
70: 0x564942a89f7f - main
71: 0x7f5dbbc27781 - <unknown>
72: 0x7f5dbbc278b9 - __libc_start_main
73: 0x564942a5d1c5 - _start
74: 0x0 - <unknown>
ra @ 6aeeb8cf02741e5da07a1615a05faa506cecb21a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with crates/hir/src/diagnostics.rs around the inference diagnostic handling at line 2053, then reproduce the report with the format! example and rust-analyzer analysis-stats . --run-all-ide-things using debug assertions. Done looks like this input produces a diagnostic or completes analysis without panicking on an inference diagnostic in a desugared expression.
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
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100