]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/pat.rs
Rollup merge of #97015 - nrc:read-buf-cursor, r=Mark-Simulacrum
[rust.git] / compiler / rustc_typeck / src / check / pat.rs
index a13c7152582077defba80f87f24df6a44adc8c4e..6dcc364bb50f7838df7687d5428d643313748e77 100644 (file)
@@ -927,7 +927,7 @@ fn emit_bad_pat_path(
                     ),
                 );
                 match self.tcx.hir().get(self.tcx.hir().get_parent_node(pat.hir_id)) {
-                    hir::Node::Pat(Pat { kind: hir::PatKind::Struct(..), .. }) => {
+                    hir::Node::PatField(..) => {
                         e.span_suggestion_verbose(
                             ident.span.shrink_to_hi(),
                             "bind the struct field to a different name instead",