about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-01 16:31:23 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-01 16:31:23 +0200
commit1e474c2c6cea4b4ce36e3f00a8bc6a60b9c2cbf5 (patch)
tree2d92aa510907e38c3700a8093a0d6ff64bd426de /compiler/rustc_passes/src
parent86e05cd300fac9e83e812c4d46582b48db780d8f (diff)
downloadrust-1e474c2c6cea4b4ce36e3f00a8bc6a60b9c2cbf5.tar.gz
rust-1e474c2c6cea4b4ce36e3f00a8bc6a60b9c2cbf5.zip
Port `#[rustc_object_lifetime_default]` to the new attribute parsing infrastructure
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 4bc48cb6aca..49b23ce50b8 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -164,7 +164,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                 }
                 Attribute::Parsed(AttributeKind::Repr(_)) => { /* handled below this loop and elsewhere */
                 }
-
+                Attribute::Parsed(AttributeKind::RustcObjectLifetimeDefault) => {
+                    self.check_object_lifetime_default(hir_id);
+                }
                 &Attribute::Parsed(AttributeKind::PubTransparent(attr_span)) => {
                     self.check_rustc_pub_transparent(attr_span, span, attrs)
                 }
@@ -303,7 +305,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                         [sym::no_implicit_prelude, ..] => {
                             self.check_generic_attr(hir_id, attr, target, Target::Mod)
                         }
-                        [sym::rustc_object_lifetime_default, ..] => self.check_object_lifetime_default(hir_id),
                         [sym::proc_macro, ..] => {
                             self.check_proc_macro(hir_id, target, ProcMacroKind::FunctionLike)
                         }