diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-08-24 13:19:31 +0200 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-09-08 14:57:28 -0700 |
| commit | b82171de5fe2a13a12f35ce4368ef34a477f55c4 (patch) | |
| tree | ce6c2877457a1b1fa6af9582bdf36140a368d052 /compiler/rustc_hir/src | |
| parent | 5dbe099dd3b9abb13cd63f8655e495f7a8d1bfcb (diff) | |
| download | rust-b82171de5fe2a13a12f35ce4368ef34a477f55c4.tar.gz rust-b82171de5fe2a13a12f35ce4368ef34a477f55c4.zip | |
port `#[pattern_complexity_limit]` to the new attribute parsing infrastructure
Diffstat (limited to 'compiler/rustc_hir/src')
| -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 22b39cb19e1..c4e068ad425 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -599,6 +599,9 @@ pub enum AttributeKind { /// Represents `#[path]` Path(Symbol, Span), + /// Represents `#[pattern_complexity_limit]` + PatternComplexityLimit { attr_span: Span, limit_span: Span, limit: usize }, + /// Represents `#[pointee]` Pointee(Span), diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs index e1f2d6d3640..89ba1e0d7de 100644 --- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs +++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs @@ -71,6 +71,7 @@ impl AttributeKind { ParenSugar(..) => No, PassByValue(..) => Yes, Path(..) => No, + PatternComplexityLimit { .. } => No, Pointee(..) => No, ProcMacro(..) => No, ProcMacroAttribute(..) => No, |
