]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/thir/pattern/mod.rs
Box `CanonicalUserTypeAnnotation::CanonicalUserType`.
[rust.git] / compiler / rustc_mir_build / src / thir / pattern / mod.rs
index b02b6b6f5ca62c490ceaa566597819f1d13a991f..21a2cb32aa76ec6c59485ba011765091a523eb7a 100644 (file)
@@ -443,7 +443,7 @@ fn lower_variant_or_leaf(
         if let Some(user_ty) = self.user_substs_applied_to_ty_of_hir_id(hir_id) {
             debug!("lower_variant_or_leaf: kind={:?} user_ty={:?} span={:?}", kind, user_ty, span);
             let annotation = CanonicalUserTypeAnnotation {
-                user_ty,
+                user_ty: Box::new(user_ty),
                 span,
                 inferred_ty: self.typeck_results.node_type(hir_id),
             };
@@ -512,7 +512,7 @@ fn lower_path(&mut self, qpath: &hir::QPath<'_>, id: hir::HirId, span: Span) ->
                 let user_provided_types = self.typeck_results().user_provided_types();
                 if let Some(&user_ty) = user_provided_types.get(id) {
                     let annotation = CanonicalUserTypeAnnotation {
-                        user_ty,
+                        user_ty: Box::new(user_ty),
                         span,
                         inferred_ty: self.typeck_results().node_type(id),
                     };