Skip to content

Commit 067ebc0

Browse files
committed
Remove the type_const attribute
1 parent de0ac58 commit 067ebc0

7 files changed

Lines changed: 0 additions & 23 deletions

File tree

compiler/rustc_attr_parsing/src/attributes/traits.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ impl<S: Stage> NoArgsAttributeParser<S> for ParenSugarParser {
6666
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcParenSugar;
6767
}
6868

69-
pub(crate) struct TypeConstParser;
70-
impl<S: Stage> NoArgsAttributeParser<S> for TypeConstParser {
71-
const PATH: &[Symbol] = &[sym::type_const];
72-
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
73-
const ALLOWED_TARGETS: AllowedTargets =
74-
AllowedTargets::AllowList(&[Allow(Target::Const), Allow(Target::AssocConst)]);
75-
const CREATE: fn(Span) -> AttributeKind = AttributeKind::TypeConst;
76-
}
77-
7869
// Markers
7970

8071
pub(crate) struct MarkerParser;

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ attribute_parsers!(
295295
Single<WithoutArgs<StdInternalSymbolParser>>,
296296
Single<WithoutArgs<ThreadLocalParser>>,
297297
Single<WithoutArgs<TrackCallerParser>>,
298-
Single<WithoutArgs<TypeConstParser>>,
299298
Single<WithoutArgs<UnsafeSpecializationMarkerParser>>,
300299
// tidy-alphabetical-end
301300
];

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -888,13 +888,6 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
888888
EncodeCrossCrate::Yes, experimental!(patchable_function_entry)
889889
),
890890

891-
// Probably temporary component of min_generic_const_args.
892-
// `#[type_const] const ASSOC: usize;`
893-
gated!(
894-
type_const, Normal, template!(Word), ErrorFollowing,
895-
EncodeCrossCrate::Yes, min_generic_const_args, experimental!(type_const),
896-
),
897-
898891
// The `#[loop_match]` and `#[const_continue]` attributes are part of the
899892
// lang experiment for RFC 3720 tracked in:
900893
//

compiler/rustc_hir/src/attrs/data_structures.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,6 @@ pub enum AttributeKind {
12851285
/// Represents `#[track_caller]`
12861286
TrackCaller(Span),
12871287

1288-
/// Represents `#[type_const]`.
1289-
TypeConst(Span),
1290-
12911288
/// Represents `#[type_length_limit]`
12921289
TypeLengthLimit { attr_span: Span, limit_span: Span, limit: Limit },
12931290

compiler/rustc_hir/src/attrs/encode_cross_crate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ impl AttributeKind {
167167
TargetFeature { .. } => No,
168168
ThreadLocal => No,
169169
TrackCaller(..) => Yes,
170-
TypeConst(..) => Yes,
171170
TypeLengthLimit { .. } => No,
172171
UnstableFeatureBound(..) => No,
173172
Used { .. } => No,

compiler/rustc_passes/src/check_attr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
354354
| AttributeKind::RustcVarianceOfOpaques
355355
| AttributeKind::ShouldPanic { .. }
356356
| AttributeKind::ThreadLocal
357-
| AttributeKind::TypeConst{..}
358357
| AttributeKind::TypeLengthLimit { .. }
359358
| AttributeKind::UnstableFeatureBound(..)
360359
| AttributeKind::Used { .. }

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,6 @@ symbols! {
23392339
type_ascribe,
23402340
type_ascription,
23412341
type_changing_struct_update,
2342-
type_const,
23432342
type_id,
23442343
type_id_eq,
23452344
type_info,

0 commit comments

Comments
 (0)