Skip to content

index out of bounds ICE in repeat_once lint #6273

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
Nadrieril opened this issue Oct 30, 2020 · 1 comment
Closed

index out of bounds ICE in repeat_once lint #6273

Nadrieril opened this issue Oct 30, 2020 · 1 comment

Comments

@Nadrieril
Copy link
Member

Message:

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
note: run with `RUST_BACKTRACE=1` environment variable to display a 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)

error: could not compile `abnf_to_pest`.
Backtrace 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: ::check_expr 4: ::check_expr 5: as rustc_hir::intravisit::Visitor>::visit_expr 6: rustc_hir::intravisit::walk_expr 7: as rustc_hir::intravisit::Visitor>::visit_expr 8: rustc_hir::intravisit::walk_expr 9: as rustc_hir::intravisit::Visitor>::visit_expr 10: rustc_hir::intravisit::walk_expr 11: as rustc_hir::intravisit::Visitor>::visit_expr 12: rustc_hir::intravisit::walk_expr 13: as rustc_hir::intravisit::Visitor>::visit_expr 14: rustc_hir::intravisit::walk_expr 15: as rustc_hir::intravisit::Visitor>::visit_expr 16: as rustc_hir::intravisit::Visitor>::visit_nested_body 17: as rustc_hir::intravisit::Visitor>::visit_fn 18: rustc_hir::intravisit::walk_impl_item 19: rustc_hir::intravisit::Visitor::visit_nested_impl_item 20: rustc_hir::intravisit::walk_item 21: rustc_hir::intravisit::Visitor::visit_nested_item 22: rustc_hir::intravisit::walk_crate 23: rustc_lint::late::late_lint_pass_crate 24: rustc_lint::late::late_lint_crate 25: rustc_data_structures::sync::join 26: rustc_session::utils::::time 27: as core::ops::function::FnOnce<()>>::call_once 28: rustc_session::utils::::time 29: rustc_interface::passes::analysis 30: rustc_middle::ty::query:: for rustc_middle::ty::que ry::queries::analysis>::compute 31: rustc_middle::dep_graph::::with_deps 32: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 33: rustc_data_structures::stack::ensure_sufficient_stack 34: rustc_query_system::query::plumbing::get_query_impl 35: rustc_interface::queries::::enter 36: rustc_span::with_source_map 37: rustc_interface::interface::create_compiler_and_run 38: scoped_tls::ScopedKey::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 abnf_to_pest.

You can see the CI error here

The line that causes the problem is that one. If I comment it out the crash stops happening.

@ebroto
Copy link
Member

ebroto commented Oct 30, 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 Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants