Reduce P<T> to a typedef of Box<T>.

Keep the `P` constructor function for now, to minimize immediate churn.

All the `into_inner` calls are removed, which is nice.
This commit is contained in:
Nicholas Nethercote
2025-05-27 02:32:22 +10:00
parent c42d1fc2c6
commit 991c91fdaa
15 changed files with 48 additions and 131 deletions

View File

@@ -2273,9 +2273,9 @@ impl<'a> Parser<'a> {
),
// Also catches `fn foo(&a)`.
PatKind::Ref(ref inner_pat, mutab)
if matches!(inner_pat.clone().into_inner().kind, PatKind::Ident(..)) =>
if matches!(inner_pat.clone().kind, PatKind::Ident(..)) =>
{
match inner_pat.clone().into_inner().kind {
match inner_pat.clone().kind {
PatKind::Ident(_, ident, _) => {
let mutab = mutab.prefix_str();
(