diff options
| author | Ralf Jung <post@ralfj.de> | 2018-11-15 13:25:22 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-11-25 10:49:43 +0100 |
| commit | 53ed3b79562fdbcbb1ca073cb48a6fea1e23d51a (patch) | |
| tree | 0579f09faacc5ab3488e7a784975e171f76fe629 /src/librustc | |
| parent | 6cca7165ea60d1bd8b3347a68972b9c5bcbd2d5c (diff) | |
| download | rust-53ed3b79562fdbcbb1ca073cb48a6fea1e23d51a.tar.gz rust-53ed3b79562fdbcbb1ca073cb48a6fea1e23d51a.zip | |
make memory allocation hook infallible
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/mir/interpret/allocation.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index b1e92ef4b51..d6c740794d5 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -59,7 +59,7 @@ pub trait AllocationExtra<Tag, MemoryExtra>: ::std::fmt::Debug + Clone { fn memory_allocated( _size: Size, _memory_extra: &MemoryExtra - ) -> EvalResult<'tcx, Self>; + ) -> Self; /// Hook for performing extra checks on a memory read access. /// @@ -102,8 +102,8 @@ impl AllocationExtra<(), ()> for () { fn memory_allocated( _size: Size, _memory_extra: &() - ) -> EvalResult<'tcx, Self> { - Ok(()) + ) -> Self { + () } } |
