diff options
| author | Michael Goulet <michael@errs.io> | 2024-04-02 19:40:12 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-04-02 19:40:18 -0400 |
| commit | 4cb5643bd4b9a66f8c8b8fee2505a7f09b8ed10a (patch) | |
| tree | 404df83e7642e63c1e37d0d6038f37ffc0469205 /compiler/rustc_ast/src/util | |
| parent | ab821aed0c048964a86285d534ca93203d61af89 (diff) | |
| download | rust-4cb5643bd4b9a66f8c8b8fee2505a7f09b8ed10a.tar.gz rust-4cb5643bd4b9a66f8c8b8fee2505a7f09b8ed10a.zip | |
Fix contains_exterior_struct_lit
Diffstat (limited to 'compiler/rustc_ast/src/util')
| -rw-r--r-- | compiler/rustc_ast/src/util/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/util/parser.rs b/compiler/rustc_ast/src/util/parser.rs index 544db992f4f..373c0ebcc5c 100644 --- a/compiler/rustc_ast/src/util/parser.rs +++ b/compiler/rustc_ast/src/util/parser.rs @@ -392,7 +392,8 @@ pub fn contains_exterior_struct_lit(value: &ast::Expr) -> bool { | ast::ExprKind::Cast(x, _) | ast::ExprKind::Type(x, _) | ast::ExprKind::Field(x, _) - | ast::ExprKind::Index(x, _, _) => { + | ast::ExprKind::Index(x, _, _) + | ast::ExprKind::Match(x, _, ast::MatchKind::Postfix) => { // &X { y: 1 }, X { y: 1 }.y contains_exterior_struct_lit(x) } |
