about summary refs log tree commit diff
path: root/compiler/rustc_passes
diff options
context:
space:
mode:
authorPavel Grigorenko <GrigorenkoPV@ya.ru>2025-06-14 20:54:30 +0300
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2025-06-21 21:52:25 +0300
commitd86d3f3742caad06488a1bf1d7eb045606f95cdd (patch)
tree2c8a6826591544088abdec67b19f3a8aa010ebf3 /compiler/rustc_passes
parentea34650916887b5075812d0f11c1d3209e7f94ab (diff)
downloadrust-d86d3f3742caad06488a1bf1d7eb045606f95cdd.tar.gz
rust-d86d3f3742caad06488a1bf1d7eb045606f95cdd.zip
Port `#[rustc_pub_transparent]` to the new attribute system
Diffstat (limited to 'compiler/rustc_passes')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index d0630383477..57af9d62999 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -149,6 +149,10 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                 }
                 Attribute::Parsed(AttributeKind::Repr(_)) => { /* handled below this loop and elsewhere */
                 }
+
+                &Attribute::Parsed(AttributeKind::PubTransparent(attr_span)) => {
+                    self.check_rustc_pub_transparent(attr_span, span, attrs)
+                }
                 Attribute::Parsed(AttributeKind::Cold(attr_span)) => {
                     self.check_cold(hir_id, *attr_span, span, target)
                 }
@@ -288,7 +292,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                             self.check_type_const(hir_id,attr, target);
                         }
                         [sym::linkage, ..] => self.check_linkage(attr, span, target),
-                        [sym::rustc_pub_transparent, ..] => self.check_rustc_pub_transparent(attr.span(), span, attrs),
                         [
                             // ok
                             sym::allow