Skip to content

thread 'Worker' panicked at 'index out of bounds: the len is 1 but the index is 1', crates/hir-def/src/nameres/path_resolution.rs:390:33 #14606

Closed
@kamyuentse

Description

@kamyuentse

rust-analyzer version: 0.3.1481-standalone (bab80da 2023-04-16)
rustc version: rustc 1.68.2 (9eb3afe9e 2023-03-27)

relevant settings: VSCode Plugin, open the https://github.com/awslabs/mountpoint-s3 project.

thread 'Worker' panicked at 'index out of bounds: the len is 1 but the index is 1', crates/hir-def/src/nameres/path_resolution.rs:390:33
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: hir_def::nameres::path_resolution::<impl hir_def::nameres::DefMap>::resolve_path_fp_with_macro_single
   4: hir_def::resolver::ModuleItemMap::resolve_path_in_type_ns
   5: hir_def::resolver::Resolver::resolve_path_in_type_ns
   6: hir_ty::lower::TyLoweringContext::lower_ty_ext
   7: hir_ty::lower::impl_self_ty_query
   8: salsa::runtime::Runtime::execute_query_implementation
   9: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  10: salsa::derived::slot::Slot<Q,MP>::read
  11: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  12: salsa::QueryTable<Q>::get
  13: <DB as hir_ty::db::HirDatabase>::impl_self_ty
  14: hir_ty::lower::impl_trait_query
  15: salsa::runtime::Runtime::execute_query_implementation
  16: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  17: salsa::derived::slot::Slot<Q,MP>::maybe_changed_since
  18: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::maybe_changed_since
  19: salsa::derived::slot::MemoRevisions::validate_memoized_value
  20: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  21: salsa::derived::slot::Slot<Q,MP>::read
  22: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  23: <DB as hir_ty::db::HirDatabase>::trait_impls_in_crate::__shim
  24: hir_ty::method_resolution::TraitImpls::trait_impls_in_deps_query
  25: salsa::runtime::Runtime::execute_query_implementation
  26: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  27: salsa::derived::slot::Slot<Q,MP>::read
  28: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  29: <DB as hir_ty::db::HirDatabase>::trait_impls_in_deps::__shim
  30: hir_ty::chalk_db::<impl chalk_solve::RustIrDatabase<hir_ty::interner::Interner> for hir_ty::traits::ChalkContext>::impls_for_trait
  31: chalk_recursive::solve::SolveIteration::solve_iteration
  32: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_goal
  33: chalk_recursive::fixed_point::RecursiveContext<K,V>::solve_root_goal
  34: hir_ty::traits::trait_solve_query
  35: salsa::runtime::Runtime::execute_query_implementation
  36: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  37: salsa::derived::slot::Slot<Q,MP>::read
  38: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  39: salsa::QueryTable<Q>::get
  40: <DB as hir_ty::db::HirDatabase>::trait_solve_query
  41: hir_ty::db::trait_solve_wait
  42: <DB as hir_ty::db::HirDatabase>::trait_solve
  43: hir_ty::infer::coerce::<impl hir_ty::infer::unify::InferenceTable>::coerce_inner
  44: hir_ty::infer::coerce::<impl hir_ty::infer::unify::InferenceTable>::coerce
  45: hir_ty::infer::coerce::<impl hir_ty::infer::InferenceContext>::coerce
  46: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_block
  47: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_expr_inner
  48: hir_ty::infer::expr::<impl hir_ty::infer::InferenceContext>::infer_return
  49: hir_ty::infer::infer_query
  50: salsa::runtime::Runtime::execute_query_implementation
  51: salsa::derived::slot::Slot<Q,MP>::read_upgrade
  52: salsa::derived::slot::Slot<Q,MP>::read
  53: <salsa::derived::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::try_fetch
  54: <DB as hir_ty::db::HirDatabase>::infer_query::__shim
  55: <DB as hir_ty::db::HirDatabase>::infer_query
  56: hir_ty::db::infer_wait
  57: <DB as hir_ty::db::HirDatabase>::infer
  58: hir::DefWithBody::diagnostics
  59: hir::ModuleDef::diagnostics
  60: hir::Module::diagnostics
  61: ide_diagnostics::diagnostics
  62: std::panicking::try
  63: ide::Analysis::assists_with_fixes
  64: rust_analyzer::handlers::handle_code_action
  65: std::panicking::try
  66: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic context:
> 
version: 0.3.1481-standalone (bab80dae4 2023-04-16)
request: textDocument/semanticTokens/full/delta SemanticTokensDeltaParams {
    work_done_progress_params: WorkDoneProgressParams {
        work_done_token: None,
    },
    partial_result_params: PartialResultParams {
        partial_result_token: None,
    },
    text_document: TextDocumentIdentifier {
        uri: Url {
            scheme: "file",
            cannot_be_a_base: false,
            username: "",
            password: None,
            host: None,
            port: None,
            path: "/path/to/mountpoint-s3/mountpoint-s3/src/fuse.rs",
            query: None,
            fragment: None,
        },
    },
    previous_result_id: "19",
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions