]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/shim.rs
Rollup merge of #57278 - mati865:config_clippy, r=alexcrichton
[rust.git] / src / librustc_mir / shim.rs
index 2aa44cc181a568c893714563a15078a36dc6f2ad..751815eab287bf03b3554218c6126cf410a4e1e2 100644 (file)
@@ -459,7 +459,9 @@ fn make_clone_call(
             span: self.span,
             ty: func_ty,
             user_ty: None,
-            literal: ty::Const::zero_sized(self.tcx, func_ty),
+            literal: tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+                ty::Const::zero_sized(func_ty),
+            )),
         });
 
         let ref_loc = self.make_place(
@@ -519,7 +521,9 @@ fn make_usize(&self, value: u64) -> Box<Constant<'tcx>> {
             span: self.span,
             ty: self.tcx.types.usize,
             user_ty: None,
-            literal: ty::Const::from_usize(self.tcx, value),
+            literal: self.tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+                ty::Const::from_usize(self.tcx, value),
+            )),
         }
     }
 
@@ -755,7 +759,9 @@ fn build_call_shim<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                 span,
                 ty,
                 user_ty: None,
-                literal: ty::Const::zero_sized(tcx, ty),
+                literal: tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+                    ty::Const::zero_sized(ty)
+                )),
              }),
              vec![rcvr])
         }