File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -142,14 +142,14 @@ impl<'a> Parser<'a> {
142
142
/// The difference from `parse_ty` is that this version allows `...`
143
143
/// (`CVarArgs`) at the top level of the type.
144
144
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 (
146
146
AllowPlus :: Yes ,
147
147
AllowCVariadic :: Yes ,
148
148
RecoverQPath :: Yes ,
149
149
RecoverReturnSign :: Yes ,
150
150
None ,
151
151
RecoverQuestionMark :: Yes ,
152
- ) ?;
152
+ ) ?) ;
153
153
154
154
// Recover a trailing `= EXPR` if present.
155
155
if self . may_recover ( )
@@ -172,7 +172,7 @@ impl<'a> Parser<'a> {
172
172
}
173
173
}
174
174
175
- Ok ( Box :: new ( ty ) )
175
+ Ok ( ty )
176
176
}
177
177
178
178
/// Parses a type in restricted contexts where `+` is not permitted.
You can’t perform that action at this time.
0 commit comments