Skip to content

Commit 7ea7d02

Browse files
committed
Rustup to rustc 1.33.0-nightly (ddab10a 2018-12-23)
1 parent 3d05ff9 commit 7ea7d02

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

example/mini_core.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
2727
// *mut T -> *mut U
2828
impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
2929

30+
#[lang = "receiver"]
31+
pub trait Receiver {}
32+
33+
impl<T: ?Sized> Receiver for &T {}
34+
impl<T: ?Sized> Receiver for &mut T {}
35+
impl<T: ?Sized> Receiver for Box<T> {}
36+
3037
#[lang = "copy"]
3138
pub unsafe trait Copy {}
3239

src/constant.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn trans_const_place<'a, 'tcx: 'a>(
150150
})),
151151
None,
152152
)?;
153-
let ptr = ecx.allocate(op.layout, MemoryKind::Stack)?;
153+
let ptr = ecx.allocate(op.layout, MemoryKind::Stack);
154154
ecx.copy_op(op, ptr.into())?;
155155
let alloc = ecx.memory().get(ptr.to_ptr()?.alloc_id)?;
156156
Ok(fx.tcx.intern_const_alloc(alloc.clone()))
@@ -372,8 +372,8 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
372372
_: &mut EvalContext<'a, 'mir, 'tcx, Self>,
373373
ptr: Pointer,
374374
_: MemoryKind<!>,
375-
) -> EvalResult<'tcx, Pointer> {
376-
Ok(ptr)
375+
) -> Pointer {
376+
ptr
377377
}
378378

379379
fn stack_push(_: &mut EvalContext<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx>{

0 commit comments

Comments
 (0)