Skip to content

Commit 8b4c5ef

Browse files
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
2 parents 4d62420 + 2598b50 commit 8b4c5ef

5 files changed

Lines changed: 1 addition & 15 deletions

File tree

compiler/rustc_attr_parsing/src/attributes/traits.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use super::prelude::*;
44
use crate::attributes::{NoArgsAttributeParser, OnDuplicate, SingleAttributeParser};
55
use crate::context::{AcceptContext, Stage};
66
use crate::parser::ArgParser;
7+
use crate::target_checking::AllowedTargets;
78
use crate::target_checking::Policy::{Allow, Warn};
8-
use crate::target_checking::{ALL_TARGETS, AllowedTargets};
99

1010
pub(crate) struct RustcSkipDuringMethodDispatchParser;
1111
impl<S: Stage> SingleAttributeParser<S> for RustcSkipDuringMethodDispatchParser {
@@ -141,11 +141,3 @@ impl<S: Stage> NoArgsAttributeParser<S> for FundamentalParser {
141141
AllowedTargets::AllowList(&[Allow(Target::Struct), Allow(Target::Trait)]);
142142
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::Fundamental;
143143
}
144-
145-
pub(crate) struct PointeeParser;
146-
impl<S: Stage> NoArgsAttributeParser<S> for PointeeParser {
147-
const PATH: &[Symbol] = &[sym::pointee];
148-
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
149-
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS); //FIXME Still checked fully in `check_attr.rs`
150-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Pointee;
151-
}

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ attribute_parsers!(
269269
Single<WithoutArgs<PanicHandlerParser>>,
270270
Single<WithoutArgs<PanicRuntimeParser>>,
271271
Single<WithoutArgs<PinV2Parser>>,
272-
Single<WithoutArgs<PointeeParser>>,
273272
Single<WithoutArgs<PreludeImportParser>>,
274273
Single<WithoutArgs<ProcMacroAttributeParser>>,
275274
Single<WithoutArgs<ProcMacroParser>>,

compiler/rustc_hir/src/attrs/data_structures.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,9 +1233,6 @@ pub enum AttributeKind {
12331233
/// Represents `#[pin_v2]`
12341234
PinV2(Span),
12351235

1236-
/// Represents `#[pointee]`
1237-
Pointee(Span),
1238-
12391236
/// Represents `#[prelude_import]`
12401237
PreludeImport,
12411238

compiler/rustc_hir/src/attrs/encode_cross_crate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ impl AttributeKind {
8686
Path(..) => No,
8787
PatternComplexityLimit { .. } => No,
8888
PinV2(..) => Yes,
89-
Pointee(..) => No,
9089
PreludeImport => No,
9190
ProcMacro(..) => No,
9291
ProcMacroAttribute(..) => No,

compiler/rustc_passes/src/check_attr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
281281
| AttributeKind::Path(..)
282282
| AttributeKind::PatternComplexityLimit { .. }
283283
| AttributeKind::PinV2(..)
284-
| AttributeKind::Pointee(..)
285284
| AttributeKind::PreludeImport
286285
| AttributeKind::ProfilerRuntime
287286
| AttributeKind::RecursionLimit { .. }

0 commit comments

Comments
 (0)