about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/pat.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-02 00:36:04 +0000
committerbors <bors@rust-lang.org>2025-04-02 00:36:04 +0000
commit70dab5a27c03a5637cc1d4ba36a5139760d25e38 (patch)
tree8f05b860d614f2eb7ad27d94bd99678659b8f32e /compiler/rustc_parse/src/parser/pat.rs
parent9b7d5ac8180f70110e94f92ccbf8fa2263d24c73 (diff)
parent592d113ff24b91290022d9f1aae271598ff235fa (diff)
downloadrust-70dab5a27c03a5637cc1d4ba36a5139760d25e38.tar.gz
rust-70dab5a27c03a5637cc1d4ba36a5139760d25e38.zip
Auto merge of #138478 - nnethercote:rm-NtExpr-NtLiteral, r=petrochenkov
Remove `NtExpr` and `NtLiteral`

The next part of #124141.

r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_parse/src/parser/pat.rs')
-rw-r--r--compiler/rustc_parse/src/parser/pat.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs
index 174cc929fa7..9612f71b2af 100644
--- a/compiler/rustc_parse/src/parser/pat.rs
+++ b/compiler/rustc_parse/src/parser/pat.rs
@@ -1252,7 +1252,7 @@ impl<'a> Parser<'a> {
                 || *t == token::Dot // e.g. `.5` for recovery;
                 || matches!(t.kind, token::Literal(..) | token::Minus)
                 || t.is_bool_lit()
-                || t.is_whole_expr()
+                || t.is_metavar_expr()
                 || t.is_lifetime() // recover `'a` instead of `'a'`
                 || (self.may_recover() // recover leading `(`
                     && *t == token::OpenDelim(Delimiter::Parenthesis)