Skip to content

Panic with attribute is missing tokens #17423

Description

@lidavidm

Summary

We started noticing this in our CI since a couple days ago.

cargo +nightly clippy --workspace --all-targets --all-features --locked -- -Dwarnings \
  -Zcrate-attr='feature(non_exhaustive_omitted_patterns_lint)' \
  -Zcrate-attr='allow(unused_features)'

Crate: https://github.com/apache/arrow-adbc/tree/a79b6741e6ff8dadef547fa0f92732a81af28a5c/rust

Version

rustc 1.99.0-nightly (daf2e5e18 2026-07-13)
binary: rustc
commit-hash: daf2e5e18b3abc4311d9da3d96fd64138f43d508
commit-date: 2026-07-13
host: x86_64-unknown-linux-gnu
release: 1.99.0-nightly
LLVM version: 22.1.8

Error output

Backtrace

thread 'rustc' panicked at /rustc-dev/daf2e5e18b3abc4311d9da3d96fd64138f43d508/compiler/rustc_ast/src/attr/mod.rs:307:36:
attribute is missing tokens: Attribute { kind: Normal(NormalAttr { item: AttrItem { unsafety: Default, path: Path { span: driver_manager/tests/connection_profile.rs:472:1: 472:8 (#187), segments: [PathSegment { ident: rustc_test_entrypoint_marker#187, id: NodeId(4294967040), args: None }] }, args: Unparsed(Empty) }, tokens: None }), id: AttrId(74), style: Outer, span: driver_manager/tests/connection_profile.rs:472:1: 472:8 (#187) }
stack backtrace:
 0:     0x7950767e994b - <std[ce10694b78262c54]::backtrace::Backtrace>::create
 1:     0x7950767e9895 - <std[ce10694b78262c54]::backtrace::Backtrace>::force_capture
 2:     0x7950757cab21 - std[ce10694b78262c54]::panicking::update_hook::<alloc[655ffa9be629a963]::boxed::Box<rustc_driver_impl[b7363d31c325300f]::install_ice_hook::{closure#1}>>::{closure#0}
 3:     0x7950767fd272 - std[ce10694b78262c54]::panicking::panic_with_hook
 4:     0x7950767deaf2 - std[ce10694b78262c54]::panicking::panic_handler::{closure#0}
 5:     0x7950767d57b9 - std[ce10694b78262c54]::sys::backtrace::__rust_end_short_backtrace::<std[ce10694b78262c54]::panicking::panic_handler::{closure#0}, !>
 6:     0x7950767e044d - __rustc[4c31565a732afefe]::rust_begin_unwind
 7:     0x7950735446cc - core[da78e946a5d06d53]::panicking::panic_fmt
 8:     0x7950779b6b56 - <rustc_ast[bf92cb4a89c1d262]::ast::Attribute>::token_trees
 9:     0x7950784bcc62 - <rustc_expand[4c42811765bd8a03]::expand::MacroExpander>::fully_expand_fragment
10:     0x79507848bfd4 - <rustc_expand[4c42811765bd8a03]::expand::MacroExpander>::expand_crate
11:     0x79507758e711 - rustc_interface[2fb4e3f9120b3398]::passes::resolver_for_lowering_raw
12:     0x79507758df26 - rustc_query_impl[2043934c093d5d4c]::query_impl::resolver_for_lowering_raw::invoke_provider_fn::__rust_begin_short_backtrace
13:     0x79507830c161 - rustc_query_impl[2043934c093d5d4c]::execution::try_execute_query::<rustc_middle[e97f70cd95bc576c]::query::caches::SingleCache<rustc_middle[e97f70cd95bc576c]::query::erase::ErasedData<[u8; 24usize]>>, true>
14:     0x79507830bc10 - rustc_query_impl[2043934c093d5d4c]::query_impl::resolver_for_lowering_raw::execute_query_incr::__rust_end_short_backtrace
15:     0x795077f032c0 - rustc_interface[2fb4e3f9120b3398]::interface::run_compiler::<(), rustc_driver_impl[b7363d31c325300f]::run_compiler::{closure#0}>::{closure#1}
16:     0x795077f6b73a - std[ce10694b78262c54]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2fb4e3f9120b3398]::util::run_in_thread_with_globals<rustc_interface[2fb4e3f9120b3398]::util::run_in_thread_pool_with_globals<rustc_interface[2fb4e3f9120b3398]::interface::run_compiler<(), rustc_driver_impl[b7363d31c325300f]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
17:     0x795077f6b4ed - <std[ce10694b78262c54]::thread::lifecycle::spawn_unchecked<rustc_interface[2fb4e3f9120b3398]::util::run_in_thread_with_globals<rustc_interface[2fb4e3f9120b3398]::util::run_in_thread_pool_with_globals<rustc_interface[2fb4e3f9120b3398]::interface::run_compiler<(), rustc_driver_impl[b7363d31c325300f]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[da78e946a5d06d53]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
18:     0x795077f6f910 - <std[ce10694b78262c54]::sys::thread::unix::Thread>::new::thread_start
19:     0x7950718a27f1 - start_thread
                             at ./nptl/pthread_create.c:448:8
20:     0x795071933b5c - __GI___clone3
                             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
21:                0x0 - <unknown>


rustc version: 1.99.0-nightly (daf2e5e18 2026-07-13)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
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