From c384f9568d9f3e794db0d550ae1fc4041e19060a Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Tue, 30 May 2017 09:27:08 -0400 Subject: [PATCH 1/2] Rvalue::Box -> Rvalue::NullaryOp --- src/eval_context.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/eval_context.rs b/src/eval_context.rs index 244f50befa..77d9d9b20c 100644 --- a/src/eval_context.rs +++ b/src/eval_context.rs @@ -788,11 +788,15 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { self.write_value(val, dest, dest_ty)?; } - Box(ty) => { + NullaryOp(mir::NullOp::Box, ty) => { let ptr = self.alloc_ptr(ty)?; self.write_primval(dest, PrimVal::Ptr(ptr), dest_ty)?; } + NullaryOp(mir::NullOp::SizeOf, _ty) => { + unimplemented!() + } + Cast(kind, ref operand, cast_ty) => { debug_assert_eq!(self.monomorphize(cast_ty, self.substs()), dest_ty); use rustc::mir::CastKind::*; From 66495222ab34d1f9275a32b6113bff0103b06221 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Tue, 30 May 2017 09:27:50 -0400 Subject: [PATCH 2/2] closure_to_fn_coercion has been stabilized --- tests/run-pass/non_capture_closure_to_fn_ptr.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/run-pass/non_capture_closure_to_fn_ptr.rs b/tests/run-pass/non_capture_closure_to_fn_ptr.rs index 6f73a3d09d..c9daff9c9f 100644 --- a/tests/run-pass/non_capture_closure_to_fn_ptr.rs +++ b/tests/run-pass/non_capture_closure_to_fn_ptr.rs @@ -1,5 +1,3 @@ -#![feature(closure_to_fn_coercion)] - // allow(const_err) to work around a bug in warnings #[allow(const_err)] static FOO: fn() = || { assert_ne!(42, 43) };