Skip to content

Commit 9b8d217

Browse files
committed
fixup! Remove boxes from ast Ty lists
1 parent a0d03a2 commit 9b8d217

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+3
-3
lines changed

compiler/rustc_parse/src/parser/ty.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ impl<'a> Parser<'a> {
142142
/// The difference from `parse_ty` is that this version allows `...`
143143
/// (`CVarArgs`) at the top level of the type.
144144
pub(super) fn parse_ty_for_param(&mut self) -> PResult<'a, Box<Ty>> {
145-
let ty = self.parse_ty_common(
145+
let ty = Box::new(self.parse_ty_common(
146146
AllowPlus::Yes,
147147
AllowCVariadic::Yes,
148148
RecoverQPath::Yes,
149149
RecoverReturnSign::Yes,
150150
None,
151151
RecoverQuestionMark::Yes,
152-
)?;
152+
)?);
153153

154154
// Recover a trailing `= EXPR` if present.
155155
if self.may_recover()
@@ -172,7 +172,7 @@ impl<'a> Parser<'a> {
172172
}
173173
}
174174

175-
Ok(Box::new(ty))
175+
Ok(ty)
176176
}
177177

178178
/// Parses a type in restricted contexts where `+` is not permitted.

0 commit comments

Comments
 (0)