about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-05-29 15:07:07 +0900
committerGitHub <noreply@github.com>2020-05-29 15:07:07 +0900
commit054fbf40190ca6685844b0f18cbaf8b92aba2b2f (patch)
treeafced6e12f07142ff89d659711e71ddc68afdc88 /src
parent05229f7be35cd2a4015cfbd4b8a83d8af76edde2 (diff)
parent461891a000835b88f44cf095533de92fa3b0b952 (diff)
downloadrust-054fbf40190ca6685844b0f18cbaf8b92aba2b2f.tar.gz
rust-054fbf40190ca6685844b0f18cbaf8b92aba2b2f.zip
Rollup merge of #72711 - lcnr:fixme-heyho, r=jonas-schievink
remove redundant `mk_const`

Taken from #72675 as this is fairly unrelated and that PR is more difficult than I imagined,
so it may take some time until it lands.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_mir/transform/const_prop.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs
index f69343f4d75..92000e64113 100644
--- a/src/librustc_mir/transform/const_prop.rs
+++ b/src/librustc_mir/transform/const_prop.rs
@@ -606,7 +606,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
         Operand::Constant(Box::new(Constant {
             span,
             user_ty: None,
-            literal: self.tcx.mk_const(*ty::Const::from_scalar(self.tcx, scalar, ty)),
+            literal: ty::Const::from_scalar(self.tcx, scalar, ty),
         }))
     }