Skip to content

Internal compiler error when running clippy on Nightly #15687

@romancardenas

Description

@romancardenas

Summary

As part of the CI checks in the e310x Cargo workspace, I am currently facing an internal compiler error while running Clippy on the latest Nightly. You can check the error logs here.

I'm not sure what the problem is. I rancargo build locally and it works without issues with the same compiler version. However, Clippy also returns a compiler error.

I tried with stable, and both build and clippy work without any issues.

Version

rustc 1.92.0-nightly (a454fccb0 2025-09-15)
binary: rustc
commit-hash: a454fccb02df9d361f1201b747c01257f58a8b37
commit-date: 2025-09-15
host: aarch64-apple-darwin
release: 1.92.0-nightly
LLVM version: 21.1.1

Error output

thread 'rustc' panicked at src/tools/clippy/clippy_lints/src/len_zero.rs:374:36:
Box<dyn Any>
stack backtrace:
   0:        0x1131baba4 - std::backtrace::Backtrace::create::h5231ff0471cb789a
   1:        0x1111bfd40 - std[dd376c14ac78749f]::panicking::update_hook::<alloc[d403e9d1feab4713]::boxed::Box<rustc_driver_impl[e37c364d9087d7ca]::install_ice_hook::{closure#1}>>::{closure#0}
   2:        0x1131bbac0 - std::panicking::panic_with_hook::hf8b81008913253bd
   3:        0x111246618 - std[dd376c14ac78749f]::panicking::begin_panic::<rustc_errors[801141c7de21b1fa]::ExplicitBug>::{closure#0}
   4:        0x111233a70 - std[dd376c14ac78749f]::sys::backtrace::__rust_end_short_backtrace::<std[dd376c14ac78749f]::panicking::begin_panic<rustc_errors[801141c7de21b1fa]::ExplicitBug>::{closure#0}, !>
   5:        0x115f8460c - std[dd376c14ac78749f]::panicking::begin_panic::<rustc_errors[801141c7de21b1fa]::ExplicitBug>
   6:        0x115f84b48 - <rustc_errors[801141c7de21b1fa]::diagnostic::BugAbort as rustc_errors[801141c7de21b1fa]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   7:        0x115fed028 - rustc_middle[35150da0e1bf896c]::util::bug::opt_span_bug_fmt::<rustc_span[20ef68246ebd198]::span_encoding::Span>::{closure#0}
   8:        0x111e1830c - rustc_middle[35150da0e1bf896c]::ty::context::tls::with_opt::<rustc_middle[35150da0e1bf896c]::util::bug::opt_span_bug_fmt<rustc_span[20ef68246ebd198]::span_encoding::Span>::{closure#0}, !>::{closure#0}
   9:        0x111ded288 - rustc_middle[35150da0e1bf896c]::ty::context::tls::with_context_opt::<rustc_middle[35150da0e1bf896c]::ty::context::tls::with_opt<rustc_middle[35150da0e1bf896c]::util::bug::opt_span_bug_fmt<rustc_span[20ef68246ebd198]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  10:        0x115ff03f0 - rustc_middle[35150da0e1bf896c]::util::bug::bug_fmt
  11:        0x10445da40 - clippy_lints[593f0b5103189e9a]::len_zero::parse_len_output
  12:        0x1044e9ee8 - <clippy_lints[593f0b5103189e9a]::len_zero::LenZero as rustc_lint[1dcd70d7cd895124]::passes::LateLintPass>::check_impl_item
  13:        0x111b421f0 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
  14:        0x111c9e5a8 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item
  15:        0x111b42c48 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
  16:        0x111c9e5a8 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item
  17:        0x111b42c48 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
  18:        0x111c9e5a8 - <rustc_lint[1dcd70d7cd895124]::late::LateContextAndPass<rustc_lint[1dcd70d7cd895124]::late::RuntimeCombinedLateLintPass> as rustc_hir[1a768ca1e4d9993e]::intravisit::Visitor>::visit_item
  19:        0x111beb258 - rustc_lint[1dcd70d7cd895124]::late::check_crate::{closure#0}
  20:        0x111c1a390 - rustc_lint[1dcd70d7cd895124]::late::check_crate
  21:        0x111a9d0e0 - rustc_interface[629f7bcd1531136]::passes::analysis::{closure#0}
  22:        0x111ac93d8 - rustc_interface[629f7bcd1531136]::passes::analysis
  23:        0x11266d1f4 - rustc_query_impl[529f188bcef6da09]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[529f188bcef6da09]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[35150da0e1bf896c]::query::erase::Erased<[u8; 0usize]>>
  24:        0x1126b2964 - rustc_query_system[ed87ac3a4c3f471]::query::plumbing::try_execute_query::<rustc_query_impl[529f188bcef6da09]::DynamicConfig<rustc_query_system[ed87ac3a4c3f471]::query::caches::SingleCache<rustc_middle[35150da0e1bf896c]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[529f188bcef6da09]::plumbing::QueryCtxt, true>
  25:        0x11282878c - rustc_query_impl[529f188bcef6da09]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  26:        0x1111b2e2c - rustc_interface[629f7bcd1531136]::passes::create_and_enter_global_ctxt::<core[cdeafd56aac32b1f]::option::Option<rustc_interface[629f7bcd1531136]::queries::Linker>, rustc_driver_impl[e37c364d9087d7ca]::run_compiler::{closure#0}::{closure#2}>
  27:        0x1111c3d80 - rustc_interface[629f7bcd1531136]::interface::run_compiler::<(), rustc_driver_impl[e37c364d9087d7ca]::run_compiler::{closure#0}>::{closure#1}
  28:        0x1111b5bf4 - std[dd376c14ac78749f]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[629f7bcd1531136]::util::run_in_thread_with_globals<rustc_interface[629f7bcd1531136]::util::run_in_thread_pool_with_globals<rustc_interface[629f7bcd1531136]::interface::run_compiler<(), rustc_driver_impl[e37c364d9087d7ca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  29:        0x1111c790c - <<std[dd376c14ac78749f]::thread::Builder>::spawn_unchecked_<rustc_interface[629f7bcd1531136]::util::run_in_thread_with_globals<rustc_interface[629f7bcd1531136]::util::run_in_thread_pool_with_globals<rustc_interface[629f7bcd1531136]::interface::run_compiler<(), rustc_driver_impl[e37c364d9087d7ca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[cdeafd56aac32b1f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:        0x1131b1a24 - std::sys::thread::unix::Thread::new::thread_start::ha29a6481522d4dce
  31:        0x1836cec0c - __pthread_cond_wait


rustc version: 1.92.0-nightly (a454fccb0 2025-09-15)
platform: aarch64-apple-darwin

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions