Skip to content

thread 'rustc' panicked at 'Not a type: DefIndex(4344)', compiler/rustc_metadata/src/rmeta/decoder.rs:908:32 #6855

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
teymour-aldridge opened this issue Mar 5, 2021 · 4 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@teymour-aldridge
Copy link

Clippy paniced while running.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.52 (45b3c28 2021-03-04)

query stack during panic:
#0 [type_of] computing type of `rocket::form::FromForm::Context`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `main`

This was in a Github workflow run here: https://github.com/lovelace-edu/lovelace/runs/2043017937 (the relevant pull request is https://github.com/lovelace-edu/lovelace/pull/114 if that helps to find out where the bug comes from).

@WaffleLapkin
Copy link
Member

Isn't this a dup of #6792?

@MikaelCall
Copy link

I have the same issue (and I've hade it since it was reported in #6792 despite upgrading about every second day after the fix was merged). Here's my error output if that helps:

> cargo clippy --version
clippy 0.1.52 (234781a 2021-03-07)
> rustc --version --verbose
rustc 1.52.0-nightly (234781afe 2021-03-07)
binary: rustc
commit-hash: 234781afe33d3f339b002f85f948046d8476cfc9
commit-date: 2021-03-07
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

> RUST_BACKTRACE=1 cargo clippy
    Checking xxx
    Checking xxx
thread 'rustc' panicked at 'Not a type: DefIndex(1496)', compiler/rustc_metadata/src/rmeta/decoder.rs:908:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/234781afe33d3f339b002f85f948046d8476cfc9/library/std/src/panicking.rs:435:5
   2: rustc_metadata::rmeta::decoder::<impl rustc_metadata::creader::CrateMetadataRef>::get_type
   3: rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::type_of
   4: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
   5: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
   6: rustc_data_structures::stack::ensure_sufficient_stack
   7: rustc_query_system::query::plumbing::force_query_with_job
   8: rustc_query_system::query::plumbing::get_query_impl
   9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::type_of
  10: <clippy_lints::default_numeric_fallback::NumericFallbackVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  11: <clippy_lints::default_numeric_fallback::NumericFallbackVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  12: rustc_hir::intravisit::walk_expr
  13: <clippy_lints::default_numeric_fallback::NumericFallbackVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  14: <clippy_lints::default_numeric_fallback::NumericFallbackVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  15: <clippy_lints::default_numeric_fallback::NumericFallbackVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  16: <clippy_lints::default_numeric_fallback::DefaultNumericFallback as rustc_lint::passes::LateLintPass>::check_body
  17: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_body
  18: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_nested_body
  19: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_fn
  20: rustc_hir::intravisit::walk_impl_item
  21: rustc_hir::intravisit::Visitor::visit_nested_impl_item
  22: rustc_hir::intravisit::walk_impl_item_ref
  23: rustc_hir::intravisit::walk_item
  24: rustc_hir::intravisit::Visitor::visit_nested_item
  25: rustc_hir::intravisit::walk_mod
  26: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod
  27: rustc_hir::intravisit::walk_item
  28: rustc_hir::intravisit::Visitor::visit_nested_item
  29: rustc_hir::intravisit::walk_mod
  30: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod
  31: rustc_hir::intravisit::walk_item
  32: rustc_hir::intravisit::Visitor::visit_nested_item
  33: rustc_hir::intravisit::walk_mod
  34: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod
  35: rustc_hir::intravisit::walk_crate
  36: rustc_lint::late::late_lint_pass_crate
  37: rustc_session::utils::<impl rustc_session::session::Session>::time
  38: std::panic::catch_unwind
  39: rustc_session::utils::<impl rustc_session::session::Session>::time
  40: rustc_interface::passes::analysis
  41: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_data_structures::stack::ensure_sufficient_stack
  44: rustc_query_system::query::plumbing::force_query_with_job
  45: rustc_query_system::query::plumbing::get_query_impl
  46: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  47: rustc_interface::passes::QueryContext::enter
  48: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  49: rustc_span::with_source_map
  50: rustc_interface::interface::create_compiler_and_run
  51: rustc_span::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.52 (234781a 2021-03-07)

query stack during panic:
#0 [type_of] computing type of `Xxx`
#1 [analysis] running analysis passes on this crate
end of query stack

@giraffate giraffate added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Mar 9, 2021
@Y-Nak
Copy link
Contributor

Y-Nak commented Mar 12, 2021

This seems duplicates of #6882 and this has been already fixed in #6812, please see discussion of #6882 for more details.

@llogiq
Copy link
Contributor

llogiq commented Mar 12, 2021

Closing as duplicate

@llogiq llogiq closed this as completed Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

6 participants