mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
45223feeba
Fix ICE when combining #[eii] with #[core::contracts::ensures] Fixes rust-lang/rust#153745 Builtin attribute macros like #[eii] generate AST items programmatically without collected tokens. When another attribute macro was present on the same item, the compiler would panic in TokenStream::from_ast() trying to tokenize the generated items during subsequent attribute expansion. Generate fake token streams (via pretty-print and re-parse) for Item and ForeignItem nodes that lack collected tokens, following the existing pattern used for Crate and out-of-line modules.