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> {
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.
You can’t perform that action at this time.
0 commit comments