mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
fd2950b691
Revert "Also duplicate `#[expect]` attribute in `#[derive]`-ed code" Turns out rust-lang/rust#152289 doesn't work, not because cloning an attribute doesn't keep the same attribute id, but because `#[cfg]` and `#[cfg_attr]` [re-parse items from scratch](https://github.com/rust-lang/rust/blob/859951e3c7c9d0322c39bad49221937455bdffcd/compiler/rustc_builtin_macros/src/cfg_eval.rs#L100-L109) bypassing any cloning on AST and forcing the creation of new attribute IDs. 😕 Fixes rust-lang/rust#153036 Fixes rust-lang/rust#152401 Reopens rust-lang/rust#150553