Box CanonicalUserTypeAnnotation::CanonicalUserType
.
This shrinks `Ascription`, which shrinks `PatKind::AscribeUserType`, which shrinks `Pat`.
This commit is contained in:
parent
2c4c8eb1a3
commit
a40124e01c
7 changed files with 18 additions and 18 deletions
|
@ -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,
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue