Skip to content
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

ICE: I'm not sure why #6281

Closed
richard-uk1 opened this issue Oct 31, 2020 · 1 comment
Closed

ICE: I'm not sure why #6281

richard-uk1 opened this issue Oct 31, 2020 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@richard-uk1
Copy link

richard-uk1 commented Oct 31, 2020

Code

  • Get the latest master of druid
  • cd druid
  • cargo clippy --manifest-path=druid/Cargo.toml --all-targets --features=image,im --target wasm32-unknown-unknown -- -D warnings

Meta

  • cargo clippy -V: clippy 0.0.212 (18bf6b4 2020-10-07)
  • rustc -Vv:
    rustc 1.47.0 (18bf6b4f0 2020-10-07)
    binary: rustc
    commit-hash: 18bf6b4f01a6feaf7259ba7cdae58031af1b7b39
    commit-date: 2020-10-07
    host: x86_64-unknown-linux-gnu
    release: 1.47.0
    LLVM version: 11.0
    

Error output

error output
    Checking druid-shell v0.6.0 (/home/me/devel/non-work/contrib/druid/druid-shell)
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/tools/clippy/clippy_lints/src/repeat_once.rs:44:93
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: core::panicking::panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
   2: core::panicking::panic_bounds_check
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:62
   3: <clippy_lints::repeat_once::RepeatOnce as rustc_lint::passes::LateLintPass>::check_expr
   4: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_expr
   5: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_expr
   6: rustc_hir::intravisit::walk_expr
   7: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_expr
   8: rustc_hir::intravisit::walk_expr
   9: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_expr
  10: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_nested_body
  11: rustc_hir::intravisit::walk_item
  12: rustc_hir::intravisit::Visitor::visit_nested_item
  13: rustc_hir::intravisit::walk_item
  14: rustc_hir::intravisit::Visitor::visit_nested_item
  15: rustc_hir::intravisit::walk_item
  16: rustc_hir::intravisit::Visitor::visit_nested_item
  17: rustc_hir::intravisit::walk_item
  18: rustc_hir::intravisit::Visitor::visit_nested_item
  19: rustc_hir::intravisit::walk_crate
  20: rustc_lint::late::late_lint_pass_crate
  21: rustc_lint::late::late_lint_crate
  22: rustc_data_structures::sync::join
  23: rustc_session::utils::<impl rustc_session::session::Session>::time
  24: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  25: rustc_session::utils::<impl rustc_session::session::Session>::time
  26: rustc_interface::passes::analysis
  27: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  28: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  29: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  30: rustc_data_structures::stack::ensure_sufficient_stack
  31: rustc_query_system::query::plumbing::get_query_impl
  32: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  33: rustc_span::with_source_map
  34: rustc_interface::interface::create_compiler_and_run
  35: scoped_tls::ScopedKey<T>::set
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.0.212 (18bf6b4 2020-10-07)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `druid-shell`.

To learn more, run the command again with --verbose.
@richard-uk1 richard-uk1 added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Oct 31, 2020
@ebroto
Copy link
Member

ebroto commented Nov 1, 2020

Thanks for your report!

This was fixed in #5948 but did not make it to 1.47. It should be fixed in the current beta.

There's rust-lang/rust#77750 so in case there is a point release, the fix for this would make it.

@ebroto ebroto closed this as completed Nov 1, 2020
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

2 participants