-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-new-solverBugs from the new solver migration - should be fixed before stable releaseBugs from the new solver migration - should be fixed before stable releaseA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bugI-panic
Description
rust-analyzer version: rust-analyzer version: 0.4.2594-standalone [/home/gh-bjorn3/.vscode-server/extensions/rust-lang.rust-analyzer-0.4.2594-linux-arm64/server/rust-analyzer]
rustc version: rustc 1.90.0-beta.1 (788da80fc 2025-08-04)
editor or extension: VSCode
relevant settings: Mostly default ./x.py setup
repository link (if public, optional): https://github.com/rust-lang/rust/tree/4356e83c77cb28113411fb8e2219127f708095b5
code snippet to reproduce:
Run go to references on the kind field of CompiledModule in compiler/rustc_codegen_ssa/src/lib.rs
thread 'Worker5' panicked at crates/hir-ty/src/next_solver/mapping.rs:1256:22:
internal error: entered unreachable code
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: hir_ty::next_solver::mapping::convert_ty_for_result
4: hir_ty::next_solver::mapping::convert_ty_for_result
5: hir_ty::traits::next_trait_solve
6: hir_ty::traits::trait_solve_query
7: hir_ty::infer::unify::InferenceTable::register_obligation_in_env
8: hir_ty::infer::unify::InferenceTable::normalize_projection_ty
9: <hir_ty::fold_tys_and_consts::TyFolder<F> as chalk_ir::fold::TypeFolder<hir_ty::interner::Interner>>::fold_ty
10: hir_ty::infer::unify::InferenceTable::normalize_associated_types_in
11: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::check_method_call
12: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
13: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
14: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
15: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
16: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
17: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
18: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
19: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
20: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
21: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
22: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
23: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
24: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
25: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
26: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
27: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
28: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
29: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
30: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
31: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
32: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_coerce
33: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
34: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner::{{closure}}
35: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
36: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_return
37: hir_ty::infer::infer_query::{{closure}}
38: scoped_tls::ScopedKey<T>::set
39: salsa::function::execute::<impl salsa::function::IngredientImpl<C>>::execute
40: salsa::function::fetch::<impl salsa::function::IngredientImpl<C>>::fetch_cold_with_retry
41: salsa::function::fetch::<impl salsa::function::IngredientImpl<C>>::fetch
42: std::thread::local::LocalKey<T>::with
43: <DB as hir_ty::db::HirDatabase>::infer
44: hir::semantics::SemanticsImpl::analyze_impl
45: hir::semantics::SemanticsImpl::resolve_bind_pat_to_const
46: ide_db::defs::NameClass::classify
47: ide_db::search::FindUsages::search
48: ide_db::search::FindUsages::all
49: <alloc::vec::into_iter::IntoIter<T,A> as core::iter::traits::iterator::Iterator>::fold
50: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
51: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
52: ide::references::find_all_refs
53: salsa::cancelled::Cancelled::catch
54: std::thread::local::LocalKey<T>::with
55: ide::Analysis::find_all_refs
56: rust_analyzer::handlers::request::handle_references
57: core::ops::function::FnOnce::call_once{{vtable.shim}}
58: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stacktrace:
0: infer_shim(Id(33cbe6)) -> (R20407, Durability::LOW)
at crates/hir-ty/src/db.rs:30
additional context:
0:
version: 0.4.2594-standalone
request: textDocument/references ReferenceParams {
text_document_position: TextDocumentPositionParams {
text_document: TextDocumentIdentifier {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/gh-bjorn3/rust/compiler/rustc_codegen_ssa/src/lib.rs",
query: None,
fragment: None,
},
},
position: Position {
line: 137,
character: 10,
},
},
work_done_progress_params: WorkDoneProgressParams {
work_done_token: None,
},
partial_result_params: PartialResultParams {
partial_result_token: None,
},
context: ReferenceContext {
include_declaration: true,
},
}
[Error - 3:20:47 PM] Request textDocument/references failed.
Message: request handler panicked: internal error: entered unreachable code
Code: -32603
Metadata
Metadata
Assignees
Labels
A-new-solverBugs from the new solver migration - should be fixed before stable releaseBugs from the new solver migration - should be fixed before stable releaseA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bugI-panic