diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-08-24 13:18:51 +0200 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-09-08 14:57:28 -0700 |
| commit | 5dbe099dd3b9abb13cd63f8655e495f7a8d1bfcb (patch) | |
| tree | 53e50d38d80ea7f92a489d4e8fa419bb7e82e3ca /compiler/rustc_hir | |
| parent | a38288bbe00f64204967819fd2cfe107a7902404 (diff) | |
| download | rust-5dbe099dd3b9abb13cd63f8655e495f7a8d1bfcb.tar.gz rust-5dbe099dd3b9abb13cd63f8655e495f7a8d1bfcb.zip | |
port `#[type_length_limit]` to the new attribute parsing infrastructure
Diffstat (limited to 'compiler/rustc_hir')
| -rw-r--r-- | compiler/rustc_hir/src/attrs/data_structures.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/attrs/encode_cross_crate.rs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs index c565b822619..22b39cb19e1 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -667,6 +667,9 @@ pub enum AttributeKind { /// Represents `#[type_const]`. TypeConst(Span), + /// Represents `#[type_length_limit]` + TypeLengthLimit { attr_span: Span, limit_span: Span, limit: usize }, + /// Represents `#[rustc_unsafe_specialization_marker]`. UnsafeSpecializationMarker(Span), diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs index 4df77c90155..e1f2d6d3640 100644 --- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs +++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs @@ -91,6 +91,7 @@ impl AttributeKind { TargetFeature { .. } => No, TrackCaller(..) => Yes, TypeConst(..) => Yes, + TypeLengthLimit { .. } => Yes, UnsafeSpecializationMarker(..) => No, UnstableFeatureBound(..) => No, Used { .. } => No, |
