about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorValdemar Erk <valdemar@erk.dev>2025-08-23 11:37:53 +0200
committerValdemar Erk <valdemar@erk.dev>2025-08-25 09:55:50 +0200
commit75d8687f2b6ac1e73071450cb57c4157fcba53b4 (patch)
treed9c2aa30e6cb91a029360e071dde0b580a8899c1 /compiler/rustc_passes/src
parent8df154bffddcb6bbb543ad69aff971795c5adbc2 (diff)
downloadrust-75d8687f2b6ac1e73071450cb57c4157fcba53b4.tar.gz
rust-75d8687f2b6ac1e73071450cb57c4157fcba53b4.zip
add span to struct pattern rest (..)
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/liveness.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs
index 801a533c943..ae16a51bc69 100644
--- a/compiler/rustc_passes/src/liveness.rs
+++ b/compiler/rustc_passes/src/liveness.rs
@@ -1583,7 +1583,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
         });
 
         let can_remove = match pat.kind {
-            hir::PatKind::Struct(_, fields, true) => {
+            hir::PatKind::Struct(_, fields, Some(_)) => {
                 // if all fields are shorthand, remove the struct field, otherwise, mark with _ as prefix
                 fields.iter().all(|f| f.is_shorthand)
             }