about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-15 08:38:13 +0000
committerbors <bors@rust-lang.org>2025-07-15 08:38:13 +0000
commita9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6 (patch)
tree635bf7b454df9fe8fbb5d76d8f75102f59e33b6b /compiler/rustc_builtin_macros
parent7f2065a4bae1faed5bab928c670964eafbf43b55 (diff)
parent7a7c74ad89df9f87824fa17fbbe0448d9ab6f7cc (diff)
downloadrust-a9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6.tar.gz
rust-a9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6.zip
Auto merge of #143460 - JonathanBrouwer:cfg_parser, r=jdonszelmann
Port `#[cfg]` to the new attribute parsing infrastructure

Ports `#[cfg]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

I've split this PR into commits for reviewability, and left some comments to clarify things
Diffstat (limited to 'compiler/rustc_builtin_macros')
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/generic/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
index 8c3093acea4..c55a9e73e38 100644
--- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
@@ -484,7 +484,7 @@ impl<'a> TraitDef<'a> {
         match item {
             Annotatable::Item(item) => {
                 let is_packed = matches!(
-                    AttributeParser::parse_limited(cx.sess, &item.attrs, sym::repr, item.span, item.id),
+                    AttributeParser::parse_limited(cx.sess, &item.attrs, sym::repr, item.span, item.id, None),
                     Some(Attribute::Parsed(AttributeKind::Repr { reprs, .. })) if reprs.iter().any(|(x, _)| matches!(x, ReprPacked(..)))
                 );