@@ -221,7 +221,7 @@ impl<'a> Parser<'a> {
221221 } else if self . check_fn_front_matter ( def_final) {
222222 // FUNCTION ITEM
223223 let ( ident, sig, generics, body) = self . parse_fn ( attrs, req_name, lo) ?;
224- ( ident, ItemKind :: Fn ( box FnKind ( def ( ) , sig, generics, body) ) )
224+ ( ident, ItemKind :: Fn ( Box :: new ( FnKind ( def ( ) , sig, generics, body) ) ) )
225225 } else if self . eat_keyword ( kw:: Extern ) {
226226 if self . eat_keyword ( kw:: Crate ) {
227227 // EXTERN CRATE
@@ -548,7 +548,7 @@ impl<'a> Parser<'a> {
548548 } ;
549549 let trait_ref = TraitRef { path, ref_id : ty_first. id } ;
550550
551- ItemKind :: Impl ( box ImplKind {
551+ ItemKind :: Impl ( Box :: new ( ImplKind {
552552 unsafety,
553553 polarity,
554554 defaultness,
@@ -557,11 +557,11 @@ impl<'a> Parser<'a> {
557557 of_trait : Some ( trait_ref) ,
558558 self_ty : ty_second,
559559 items : impl_items,
560- } )
560+ } ) )
561561 }
562562 None => {
563563 // impl Type
564- ItemKind :: Impl ( box ImplKind {
564+ ItemKind :: Impl ( Box :: new ( ImplKind {
565565 unsafety,
566566 polarity,
567567 defaultness,
@@ -570,7 +570,7 @@ impl<'a> Parser<'a> {
570570 of_trait : None ,
571571 self_ty : ty_first,
572572 items : impl_items,
573- } )
573+ } ) )
574574 }
575575 } ;
576576
@@ -710,7 +710,7 @@ impl<'a> Parser<'a> {
710710 // It's a normal trait.
711711 tps. where_clause = self . parse_where_clause ( ) ?;
712712 let items = self . parse_item_list ( attrs, |p| p. parse_trait_item ( ForceCollect :: No ) ) ?;
713- Ok ( ( ident, ItemKind :: Trait ( box TraitKind ( is_auto, unsafety, tps, bounds, items) ) ) )
713+ Ok ( ( ident, ItemKind :: Trait ( Box :: new ( TraitKind ( is_auto, unsafety, tps, bounds, items) ) ) ) )
714714 }
715715 }
716716
@@ -769,7 +769,7 @@ impl<'a> Parser<'a> {
769769 let default = if self . eat ( & token:: Eq ) { Some ( self . parse_ty ( ) ?) } else { None } ;
770770 self . expect_semi ( ) ?;
771771
772- Ok ( ( ident, ItemKind :: TyAlias ( box TyAliasKind ( def, generics, bounds, default) ) ) )
772+ Ok ( ( ident, ItemKind :: TyAlias ( Box :: new ( TyAliasKind ( def, generics, bounds, default) ) ) ) )
773773 }
774774
775775 /// Parses a `UseTree`.
0 commit comments