diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-06 22:16:42 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-06 22:19:16 +0200 |
| commit | 244d64e60b94d9ffba58a2f4e38430378aa79037 (patch) | |
| tree | 78389367873c2abf369ecd9ebbaec8de1d3a5bfc /compiler/rustc_attr_data_structures | |
| parent | ef3d7741e5f9e61b50a6023694981c913de54526 (diff) | |
| download | rust-244d64e60b94d9ffba58a2f4e38430378aa79037.tar.gz rust-244d64e60b94d9ffba58a2f4e38430378aa79037.zip | |
Port `#[path]` to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'compiler/rustc_attr_data_structures')
| -rw-r--r-- | compiler/rustc_attr_data_structures/src/attributes.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_attr_data_structures/src/encode_cross_crate.rs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_attr_data_structures/src/attributes.rs b/compiler/rustc_attr_data_structures/src/attributes.rs index ba62be676d4..84fb4f363d4 100644 --- a/compiler/rustc_attr_data_structures/src/attributes.rs +++ b/compiler/rustc_attr_data_structures/src/attributes.rs @@ -298,6 +298,9 @@ pub enum AttributeKind { /// Represents `#[rustc_pass_by_value]` (used by the `rustc_pass_by_value` lint). PassByValue(Span), + /// Represents `#[path]` + Path(Symbol, Span), + /// Represents `#[rustc_pub_transparent]` (used by the `repr_transparent_external_private_fields` lint). PubTransparent(Span), diff --git a/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs b/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs index b109ebbf47b..a6ae49d2808 100644 --- a/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs +++ b/compiler/rustc_attr_data_structures/src/encode_cross_crate.rs @@ -40,6 +40,7 @@ impl AttributeKind { NonExhaustive(..) => Yes, Optimize(..) => No, PassByValue(..) => Yes, + Path(..) => No, PubTransparent(..) => Yes, Repr { .. } => No, RustcLayoutScalarValidRangeEnd(..) => Yes, |
