diff options
| author | Valdemar Erk <valdemar@erk.dev> | 2025-08-23 11:37:53 +0200 |
|---|---|---|
| committer | Valdemar Erk <valdemar@erk.dev> | 2025-08-25 09:55:50 +0200 |
| commit | 75d8687f2b6ac1e73071450cb57c4157fcba53b4 (patch) | |
| tree | d9c2aa30e6cb91a029360e071dde0b580a8899c1 /compiler/rustc_hir/src | |
| parent | 8df154bffddcb6bbb543ad69aff971795c5adbc2 (diff) | |
| download | rust-75d8687f2b6ac1e73071450cb57c4157fcba53b4.tar.gz rust-75d8687f2b6ac1e73071450cb57c4157fcba53b4.zip | |
add span to struct pattern rest (..)
Diffstat (limited to 'compiler/rustc_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index e397c286de2..e3c27c73638 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1884,8 +1884,8 @@ pub enum PatKind<'hir> { Binding(BindingMode, HirId, Ident, Option<&'hir Pat<'hir>>), /// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`). - /// The `bool` is `true` in the presence of a `..`. - Struct(QPath<'hir>, &'hir [PatField<'hir>], bool), + /// The `Option` contains the span of a possible `..`. + Struct(QPath<'hir>, &'hir [PatField<'hir>], Option<Span>), /// A tuple struct/variant pattern `Variant(x, y, .., z)`. /// If the `..` pattern fragment is present, then `DotDotPos` denotes its position. @@ -4979,8 +4979,8 @@ mod size_asserts { static_assert_size!(ItemKind<'_>, 64); static_assert_size!(LetStmt<'_>, 72); static_assert_size!(Param<'_>, 32); - static_assert_size!(Pat<'_>, 72); - static_assert_size!(PatKind<'_>, 48); + static_assert_size!(Pat<'_>, 80); + static_assert_size!(PatKind<'_>, 56); static_assert_size!(Path<'_>, 40); static_assert_size!(PathSegment<'_>, 48); static_assert_size!(QPath<'_>, 24); |
