Skip to content

Commit 4cb5643

Browse files
Fix contains_exterior_struct_lit
1 parent ab821ae commit 4cb5643

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_ast/src/util/parser.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ pub fn contains_exterior_struct_lit(value: &ast::Expr) -> bool {
392392
| ast::ExprKind::Cast(x, _)
393393
| ast::ExprKind::Type(x, _)
394394
| ast::ExprKind::Field(x, _)
395-
| ast::ExprKind::Index(x, _, _) => {
395+
| ast::ExprKind::Index(x, _, _)
396+
| ast::ExprKind::Match(x, _, ast::MatchKind::Postfix) => {
396397
// &X { y: 1 }, X { y: 1 }.y
397398
contains_exterior_struct_lit(x)
398399
}

0 commit comments

Comments
 (0)