Rollup merge of #155304 - Bryntet:remove-pointee-parser, r=JonathanBrouwer

remove PointeeParser

this parser does nothing currently, as the current scope of `rustc_attr_parsing` only includes builtin attributes, and not derive macros

it isn't defined in `compiler/rustc_feature/src/builtin_attrs.rs`

all the actual parsing for `#[pointee]` is actually handled in `compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs`

r? @JonathanBrouwer
This commit is contained in:
Jacob Pratt
2026-04-14 23:02:37 -04:00
committed by GitHub
5 changed files with 1 additions and 15 deletions
@@ -4,8 +4,8 @@
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<S: Stage> SingleAttributeParser<S> for RustcSkipDuringMethodDispatchParser {
@@ -141,11 +141,3 @@ impl<S: Stage> NoArgsAttributeParser<S> for FundamentalParser {
AllowedTargets::AllowList(&[Allow(Target::Struct), Allow(Target::Trait)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::Fundamental;
}
pub(crate) struct PointeeParser;
impl<S: Stage> NoArgsAttributeParser<S> for PointeeParser {
const PATH: &[Symbol] = &[sym::pointee];
const ON_DUPLICATE: OnDuplicate<S> = 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;
}
@@ -269,7 +269,6 @@ mod late {
Single<WithoutArgs<PanicHandlerParser>>,
Single<WithoutArgs<PanicRuntimeParser>>,
Single<WithoutArgs<PinV2Parser>>,
Single<WithoutArgs<PointeeParser>>,
Single<WithoutArgs<PreludeImportParser>>,
Single<WithoutArgs<ProcMacroAttributeParser>>,
Single<WithoutArgs<ProcMacroParser>>,
@@ -1233,9 +1233,6 @@ pub enum AttributeKind {
/// Represents `#[pin_v2]`
PinV2(Span),
/// Represents `#[pointee]`
Pointee(Span),
/// Represents `#[prelude_import]`
PreludeImport,
@@ -86,7 +86,6 @@ pub fn encode_cross_crate(&self) -> EncodeCrossCrate {
Path(..) => No,
PatternComplexityLimit { .. } => No,
PinV2(..) => Yes,
Pointee(..) => No,
PreludeImport => No,
ProcMacro(..) => No,
ProcMacroAttribute(..) => No,
-1
View File
@@ -281,7 +281,6 @@ fn check_attributes(
| AttributeKind::Path(..)
| AttributeKind::PatternComplexityLimit { .. }
| AttributeKind::PinV2(..)
| AttributeKind::Pointee(..)
| AttributeKind::PreludeImport
| AttributeKind::ProfilerRuntime
| AttributeKind::RecursionLimit { .. }