From 2598b50f92da203310f312169e5725f14012af1e Mon Sep 17 00:00:00 2001 From: Edvin Bryntesson Date: Tue, 14 Apr 2026 20:03:51 +0200 Subject: [PATCH] remove PointeeParser --- compiler/rustc_attr_parsing/src/attributes/traits.rs | 10 +--------- compiler/rustc_attr_parsing/src/context.rs | 1 - compiler/rustc_hir/src/attrs/data_structures.rs | 3 --- compiler/rustc_hir/src/attrs/encode_cross_crate.rs | 1 - compiler/rustc_passes/src/check_attr.rs | 1 - 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/compiler/rustc_attr_parsing/src/attributes/traits.rs b/compiler/rustc_attr_parsing/src/attributes/traits.rs index 54a95ffd0ea33..e3f5f30dd4e86 100644 --- a/compiler/rustc_attr_parsing/src/attributes/traits.rs +++ b/compiler/rustc_attr_parsing/src/attributes/traits.rs @@ -4,8 +4,8 @@ use super::prelude::*; use crate::attributes::{NoArgsAttributeParser, OnDuplicate, SingleAttributeParser}; use crate::context::{AcceptContext, Stage}; use crate::parser::ArgParser; +use crate::target_checking::AllowedTargets; use crate::target_checking::Policy::{Allow, Warn}; -use crate::target_checking::{ALL_TARGETS, AllowedTargets}; pub(crate) struct RustcSkipDuringMethodDispatchParser; impl SingleAttributeParser for RustcSkipDuringMethodDispatchParser { @@ -141,11 +141,3 @@ impl NoArgsAttributeParser for FundamentalParser { AllowedTargets::AllowList(&[Allow(Target::Struct), Allow(Target::Trait)]); const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::Fundamental; } - -pub(crate) struct PointeeParser; -impl NoArgsAttributeParser for PointeeParser { - const PATH: &[Symbol] = &[sym::pointee]; - const ON_DUPLICATE: OnDuplicate = OnDuplicate::Error; - const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS); //FIXME Still checked fully in `check_attr.rs` - const CREATE: fn(Span) -> AttributeKind = AttributeKind::Pointee; -} diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs index 51345162ee071..3f722bef5bf35 100644 --- a/compiler/rustc_attr_parsing/src/context.rs +++ b/compiler/rustc_attr_parsing/src/context.rs @@ -269,7 +269,6 @@ attribute_parsers!( Single>, Single>, Single>, - Single>, Single>, Single>, Single>, diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs index 67bf1c9b91d06..f4bb5c0c3819e 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -1233,9 +1233,6 @@ pub enum AttributeKind { /// Represents `#[pin_v2]` PinV2(Span), - /// Represents `#[pointee]` - Pointee(Span), - /// Represents `#[prelude_import]` PreludeImport, diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs index dace9756dc393..239c9d0ca530b 100644 --- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs +++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs @@ -86,7 +86,6 @@ impl AttributeKind { Path(..) => No, PatternComplexityLimit { .. } => No, PinV2(..) => Yes, - Pointee(..) => No, PreludeImport => No, ProcMacro(..) => No, ProcMacroAttribute(..) => No, diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index c7a3ee456f88d..6ee8db1703b8e 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -281,7 +281,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { | AttributeKind::Path(..) | AttributeKind::PatternComplexityLimit { .. } | AttributeKind::PinV2(..) - | AttributeKind::Pointee(..) | AttributeKind::PreludeImport | AttributeKind::ProfilerRuntime | AttributeKind::RecursionLimit { .. }