Skip to content

Clippy ICE: can't get the span of an arbitrary parsed attribute: Parsed(Repr([(ReprTransparent, $file)])) #14331

Closed
@Thomasdezeeuw

Description

@Thomasdezeeuw

Summary

Clippy panicked on a CI run: https://github.com/Thomasdezeeuw/a10/actions/runs/13606695120/job/38039000081?pr=156.

Code is https://github.com/Thomasdezeeuw/a10 at commit f7f68afb716a461b5311726c2751b8fa73e440f0.

Version

rustc 1.87.0-nightly (287487624 2025-02-28)
binary: rustc
commit-hash: 287487624357c19b22d27aa3ed584b8ccd080b4d
commit-date: 2025-02-28
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0

Error output

Backtrace

thread 'rustc' panicked at /rustc/287487624357c19b22d27aa3ed584b8ccd080b4d/compiler/rustc_hir/src/hir.rs:1165:18:
can't get the span of an arbitrary parsed attribute: Parsed(Repr([(ReprTransparent, src/bitmap.rs:5:8: 5:19 (#0))]))
stack backtrace:
 0:     0x7f3aff5bba44 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h7f04604f549dcac6
 1:     0x7f3affe166ec - core::fmt::write::h57782d77b59298fc
 2:     0x7f3b00e5aed1 - std::io::Write::write_fmt::h2a3a82c351b9d922
 3:     0x7f3aff5bb8a2 - std::sys::backtrace::BacktraceLock::print::h0e7bde8219ce05f5
 4:     0x7f3aff5be0de - std::panicking::default_hook::{{closure}}::hbc4362799c59da02
 5:     0x7f3aff5bdcb4 - std::panicking::default_hook::h15f673dc79321f6d
 6:     0x7f3afe716ef7 - std[d2ca98ad708c0180]::panicking::update_hook::<alloc[20ad7b0a4737e18b]::boxed::Box<rustc_driver_impl[39710d7290e1a078]::install_ice_hook::{closure#1}>>::{closure#0}
 7:     0x7f3aff5be953 - std::panicking::rust_panic_with_hook::h326ca12e29006f46
 8:     0x7f3aff5be64a - std::panicking::begin_panic_handler::{{closure}}::hbd9442d9aa1dadc9
 9:     0x7f3aff5bbf09 - std::sys::backtrace::__rust_end_short_backtrace::h721c15f1fa9d1d05
10:     0x7f3aff5be30d - rust_begin_unwind
11:     0x7f3afc259f50 - core::panicking::panic_fmt::h7f6f5e3387e92feb
12:     0x560d110deab9 - <clippy_lints[ee7cdaa78b724745]::macro_use::MacroUseImports as rustc_lint[2a49354d509a59c4]::passes::LateLintPass>::check_attribute
13:     0x7f3afec026f6 - <rustc_lint[2a49354d509a59c4]::late::LateContextAndPass<rustc_lint[2a49354d509a59c4]::late::RuntimeCombinedLateLintPass> as rustc_hir[f13155207ba0698c]::intravisit::Visitor>::visit_nested_item
14:     0x7f3afec02910 - <rustc_lint[2a49354d509a59c4]::late::LateContextAndPass<rustc_lint[2a49354d509a59c4]::late::RuntimeCombinedLateLintPass> as rustc_hir[f13155207ba0698c]::intravisit::Visitor>::visit_nested_item
15:     0x7f3b00e5340b - rustc_lint[2a49354d509a59c4]::late::check_crate::{closure#0}
16:     0x7f3b00e536eb - rustc_lint[2a49354d509a59c4]::late::check_crate
17:     0x7f3b00e57072 - rustc_interface[50c397d1335b0763]::passes::analysis
18:     0x7f3b00e56e59 - rustc_query_impl[f6d2c9dc7285be3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f6d2c9dc7285be3]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[791afd411752c6d9]::query::erase::Erased<[u8; 0usize]>>
19:     0x7f3b00ec698b - rustc_query_system[f6814575d41f45a3]::query::plumbing::try_execute_query::<rustc_query_impl[f6d2c9dc7285be3]::DynamicConfig<rustc_query_system[f6814575d41f45a3]::query::caches::SingleCache<rustc_middle[791afd411752c6d9]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f6d2c9dc7285be3]::plumbing::QueryCtxt, false>
20:     0x7f3b00ec6679 - rustc_query_impl[f6d2c9dc7285be3]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
21:     0x7f3b00f457bc - rustc_interface[50c397d1335b0763]::passes::create_and_enter_global_ctxt::<core[bd07e1b40b28113b]::option::Option<rustc_interface[50c397d1335b0763]::queries::Linker>, rustc_driver_impl[39710d7290e1a078]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
22:     0x7f3b00f36320 - rustc_interface[50c397d1335b0763]::interface::run_compiler::<(), rustc_driver_impl[39710d7290e1a078]::run_compiler::{closure#0}>::{closure#1}
23:     0x7f3b00d77a48 - std[d2ca98ad708c0180]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[50c397d1335b0763]::util::run_in_thread_with_globals<rustc_interface[50c397d1335b0763]::util::run_in_thread_pool_with_globals<rustc_interface[50c397d1335b0763]::interface::run_compiler<(), rustc_driver_impl[39710d7290e1a078]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
24:     0x7f3b00d78334 - <<std[d2ca98ad708c0180]::thread::Builder>::spawn_unchecked_<rustc_interface[50c397d1335b0763]::util::run_in_thread_with_globals<rustc_interface[50c397d1335b0763]::util::run_in_thread_pool_with_globals<rustc_interface[50c397d1335b0763]::interface::run_compiler<(), rustc_driver_impl[39710d7290e1a078]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[bd07e1b40b28113b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
25:     0x7f3b00d79737 - std::sys::pal::unix::thread::Thread::new::thread_start::h0cde9ca89ea1dbd7
26:     0x7f3afac9caa4 - <unknown>
27:     0x7f3afad29c3c - <unknown>
28:                0x0 - <unknown>

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/work/a10/a10/rustc-ice-2025-03-01T16_29_55-1964.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.86 (2874876243 2025-02-28)

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