You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'rustc' panicked at 'byte index 36 is out of bounds of `fn zero() {
unsafe { 0 };
}
`', src/tools/clippy/clippy_lints/src/undocumented_unsafe_blocks.rs:149:23
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.1.58 (514b387 2021-10-22)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
Backtrace
0: rust_begin_unwind
at /rustc/514b3877956dc594823106b66c164f8cdbc8b3da/library/std/src/panicking.rs:495:5
1: core::panicking::panic_fmt
at /rustc/514b3877956dc594823106b66c164f8cdbc8b3da/library/core/src/panicking.rs:107:14
2: core::str::slice_error_fail
3: clippy_lints::undocumented_unsafe_blocks::UndocumentedUnsafeBlocks::block_has_safety_comment
4: <clippy_lints::undocumented_unsafe_blocks::UndocumentedUnsafeBlocks as rustc_lint::passes::LateLintPass>::check_block
5: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_block
6: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_block
7: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_expr
8: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_stmt
9: rustc_hir::intravisit::walk_block
10: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_block
11: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_expr
12: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_nested_body
13: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_fn
14: rustc_hir::intravisit::walk_item
15: rustc_hir::intravisit::Visitor::visit_nested_item
16: rustc_hir::intravisit::walk_mod
17: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod
18: rustc_hir::intravisit::Visitor::visit_nested_item
19: rustc_hir::intravisit::walk_mod
20: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod
21: rustc_middle::hir::map::Map::walk_toplevel_module
22: rustc_lint::late::late_lint_pass_crate
23: rustc_session::utils::<impl rustc_session::session::Session>::time
24: rustc_session::utils::<impl rustc_session::session::Session>::time
25: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
26: rustc_session::utils::<impl rustc_session::session::Session>::time
27: rustc_interface::passes::analysis
28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
29: rustc_data_structures::stack::ensure_sufficient_stack
30: rustc_query_system::query::plumbing::try_execute_query
31: rustc_query_system::query::plumbing::get_query
32: rustc_interface::passes::QueryContext::enter
33: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
34: rustc_span::with_source_map
35: scoped_tls::ScopedKey<T>::set
The text was updated successfully, but these errors were encountered:
dylni
added
C-bug
Category: Clippy is not doing the correct thing
I-ICE
Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
labels
Oct 23, 2021
Whoops--you are right. I actually built from source, but I was accidentally using the wrong toolchain (not the rust-toolchain override). Though I did find a new ICE with this lint, which I can report in a new issue...
Code
main.rs:
zero.rs:
Meta
Rust version (
rustc -v
):Error output
Backtrace
The text was updated successfully, but these errors were encountered: