diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-12-13 11:11:12 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-01-01 20:05:02 +0100 |
| commit | 37a0df3e9db1b934dfb698fc1d7cbf506532004f (patch) | |
| tree | 122e5d2f0b8ec2ea70e9dcd3e682649e98dc1ed7 /src/librustc_codegen_ssa | |
| parent | bb9f717a80814165dcdb4fa3f9d37a6551bcb264 (diff) | |
| download | rust-37a0df3e9db1b934dfb698fc1d7cbf506532004f.tar.gz rust-37a0df3e9db1b934dfb698fc1d7cbf506532004f.zip | |
`<&'tcx ty::Const as Deref>::deref`
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/mir/constant.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/mir/operand.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_ssa/mir/constant.rs b/src/librustc_codegen_ssa/mir/constant.rs index 35bd3a32e81..e6d6ef1d7a3 100644 --- a/src/librustc_codegen_ssa/mir/constant.rs +++ b/src/librustc_codegen_ssa/mir/constant.rs @@ -15,7 +15,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { &mut self, bx: &Bx, constant: &'tcx ty::LazyConst<'tcx>, - ) -> Result<&'tcx ty::Const<'tcx>, ErrorHandled> { + ) -> Result<ty::Const<'tcx>, ErrorHandled> { match *constant { ty::LazyConst::Unevaluated(def_id, ref substs) => { let tcx = bx.tcx(); @@ -35,7 +35,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { &mut self, bx: &Bx, constant: &mir::Constant<'tcx>, - ) -> Result<&'tcx ty::Const<'tcx>, ErrorHandled> { + ) -> Result<ty::Const<'tcx>, ErrorHandled> { let c = self.monomorphize(&constant.literal); self.fully_evaluate(bx, c) } @@ -46,7 +46,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { bx: &Bx, span: Span, ty: Ty<'tcx>, - constant: Result<&'tcx ty::Const<'tcx>, ErrorHandled>, + constant: Result<ty::Const<'tcx>, ErrorHandled>, ) -> (Bx::Value, Ty<'tcx>) { constant .and_then(|c| { diff --git a/src/librustc_codegen_ssa/mir/operand.rs b/src/librustc_codegen_ssa/mir/operand.rs index bb55bf3b46c..2026e042ef0 100644 --- a/src/librustc_codegen_ssa/mir/operand.rs +++ b/src/librustc_codegen_ssa/mir/operand.rs @@ -67,7 +67,7 @@ impl<'a, 'tcx: 'a, V: CodegenObject> OperandRef<'tcx, V> { pub fn from_const<Bx: BuilderMethods<'a, 'tcx, Value = V>>( bx: &mut Bx, - val: &'tcx ty::Const<'tcx> + val: ty::Const<'tcx> ) -> Result<Self, ErrorHandled> { let layout = bx.cx().layout_of(val.ty); |
