@@ -42,10 +42,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
4242 Constant { span, user_ty : None , literal }
4343 }
4444 ExprKind :: NonHirLiteral { lit, ref user_ty } => {
45- let user_ty = user_ty. as_ref ( ) . map ( |box user_ty| {
45+ let user_ty = user_ty. as_ref ( ) . map ( |user_ty| {
4646 this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
4747 span,
48- user_ty : * user_ty,
48+ user_ty : user_ty. clone ( ) ,
4949 inferred_ty : ty,
5050 } )
5151 } ) ;
@@ -54,10 +54,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
5454 Constant { span, user_ty : user_ty, literal }
5555 }
5656 ExprKind :: ZstLiteral { ref user_ty } => {
57- let user_ty = user_ty. as_ref ( ) . map ( |box user_ty| {
57+ let user_ty = user_ty. as_ref ( ) . map ( |user_ty| {
5858 this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
5959 span,
60- user_ty : * user_ty,
60+ user_ty : user_ty. clone ( ) ,
6161 inferred_ty : ty,
6262 } )
6363 } ) ;
@@ -66,10 +66,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
6666 Constant { span, user_ty : user_ty, literal }
6767 }
6868 ExprKind :: NamedConst { def_id, substs, ref user_ty } => {
69- let user_ty = user_ty. as_ref ( ) . map ( |box user_ty| {
69+ let user_ty = user_ty. as_ref ( ) . map ( |user_ty| {
7070 this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
7171 span,
72- user_ty : * user_ty,
72+ user_ty : user_ty. clone ( ) ,
7373 inferred_ty : ty,
7474 } )
7575 } ) ;
0 commit comments