@@ -42,10 +42,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
42
42
Constant { span, user_ty : None , literal }
43
43
}
44
44
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| {
46
46
this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
47
47
span,
48
- user_ty : * user_ty,
48
+ user_ty : user_ty. clone ( ) ,
49
49
inferred_ty : ty,
50
50
} )
51
51
} ) ;
@@ -54,10 +54,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
54
54
Constant { span, user_ty : user_ty, literal }
55
55
}
56
56
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| {
58
58
this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
59
59
span,
60
- user_ty : * user_ty,
60
+ user_ty : user_ty. clone ( ) ,
61
61
inferred_ty : ty,
62
62
} )
63
63
} ) ;
@@ -66,10 +66,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
66
66
Constant { span, user_ty : user_ty, literal }
67
67
}
68
68
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| {
70
70
this. canonical_user_type_annotations . push ( CanonicalUserTypeAnnotation {
71
71
span,
72
- user_ty : * user_ty,
72
+ user_ty : user_ty. clone ( ) ,
73
73
inferred_ty : ty,
74
74
} )
75
75
} ) ;
0 commit comments