1
Fork 0

Box CanonicalUserTypeAnnotation::CanonicalUserType.

This shrinks `Ascription`, which shrinks `PatKind::AscribeUserType`,
which shrinks `Pat`.
This commit is contained in:
Nicholas Nethercote 2022-08-26 11:53:54 +10:00
parent 2c4c8eb1a3
commit a40124e01c
7 changed files with 18 additions and 18 deletions

View file

@ -42,10 +42,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
Constant { span, user_ty: None, literal }
}
ExprKind::NonHirLiteral { lit, ref user_ty } => {
let user_ty = user_ty.as_ref().map(|box user_ty| {
let user_ty = user_ty.as_ref().map(|user_ty| {
this.canonical_user_type_annotations.push(CanonicalUserTypeAnnotation {
span,
user_ty: *user_ty,
user_ty: user_ty.clone(),
inferred_ty: ty,
})
});
@ -54,10 +54,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
Constant { span, user_ty: user_ty, literal }
}
ExprKind::ZstLiteral { ref user_ty } => {
let user_ty = user_ty.as_ref().map(|box user_ty| {
let user_ty = user_ty.as_ref().map(|user_ty| {
this.canonical_user_type_annotations.push(CanonicalUserTypeAnnotation {
span,
user_ty: *user_ty,
user_ty: user_ty.clone(),
inferred_ty: ty,
})
});
@ -66,10 +66,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
Constant { span, user_ty: user_ty, literal }
}
ExprKind::NamedConst { def_id, substs, ref user_ty } => {
let user_ty = user_ty.as_ref().map(|box user_ty| {
let user_ty = user_ty.as_ref().map(|user_ty| {
this.canonical_user_type_annotations.push(CanonicalUserTypeAnnotation {
span,
user_ty: *user_ty,
user_ty: user_ty.clone(),
inferred_ty: ty,
})
});