From 789a6b98b9e1d62d7fec5791ff3306421a7b7add Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Wed, 18 Dec 2019 20:10:39 -0600 Subject: [PATCH] Update nightly Updated to `nightly-x86_64-apple-darwin updated - rustc 1.41.0-nightly (19bd93467 2019-12-18)`. It includes https://github.com/rust-lang/rust/pull/66256, which removed the `unwrap` on `align_to_pad`. --- liblumen_alloc/src/blocks/free_block_tree.rs | 4 ++-- liblumen_alloc/src/erts/fragment.rs | 2 +- liblumen_alloc/src/erts/process/gc/old_heap.rs | 2 +- liblumen_alloc/src/erts/process/gc/sweep.rs | 3 +-- liblumen_alloc/src/erts/process/gc/young_heap.rs | 2 +- liblumen_alloc/src/erts/term/binary/heap.rs | 2 +- liblumen_alloc/src/erts/term/binary/process.rs | 2 +- liblumen_alloc/src/erts/term/closure.rs | 2 +- liblumen_alloc/src/erts/term/tuple.rs | 2 +- liblumen_alloc/src/erts/testing.rs | 2 +- liblumen_eir_interpreter/src/exec/mod.rs | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/liblumen_alloc/src/blocks/free_block_tree.rs b/liblumen_alloc/src/blocks/free_block_tree.rs index 985c5703a..b84c6992a 100644 --- a/liblumen_alloc/src/blocks/free_block_tree.rs +++ b/liblumen_alloc/src/blocks/free_block_tree.rs @@ -54,7 +54,7 @@ impl FreeBlocks { let mut cursor = self.addr_tree.front(); let mut result = None; - let aligned = layout.pad_to_align().unwrap(); + let aligned = layout.pad_to_align(); let requested = aligned.size(); while let Some(block) = cursor.get() { @@ -77,7 +77,7 @@ impl FreeBlocks { let mut result = None; let mut best_size = 0; - let aligned = layout.pad_to_align().unwrap(); + let aligned = layout.pad_to_align(); let requested = aligned.size(); match self.order { diff --git a/liblumen_alloc/src/erts/fragment.rs b/liblumen_alloc/src/erts/fragment.rs index e38af587e..41c2d4c90 100644 --- a/liblumen_alloc/src/erts/fragment.rs +++ b/liblumen_alloc/src/erts/fragment.rs @@ -123,7 +123,7 @@ impl HeapAlloc for HeapFragment { use liblumen_core::sys::sysconf::MIN_ALIGN; // Ensure layout has alignment padding - let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap(); + let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align(); // Capture the base pointer for this allocation let top = self.heap_top() as *mut u8; // Calculate available space and fail if not enough is free diff --git a/liblumen_alloc/src/erts/process/gc/old_heap.rs b/liblumen_alloc/src/erts/process/gc/old_heap.rs index 288b40751..e39856f88 100644 --- a/liblumen_alloc/src/erts/process/gc/old_heap.rs +++ b/liblumen_alloc/src/erts/process/gc/old_heap.rs @@ -85,7 +85,7 @@ impl HeapAlloc for OldHeap { unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult> { use liblumen_core::sys::sysconf::MIN_ALIGN; - let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap(); + let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align(); let needed = layout.size(); let available = self.heap_available() * mem::size_of::(); diff --git a/liblumen_alloc/src/erts/process/gc/sweep.rs b/liblumen_alloc/src/erts/process/gc/sweep.rs index 9f089e5d4..f0ac11098 100644 --- a/liblumen_alloc/src/erts/process/gc/sweep.rs +++ b/liblumen_alloc/src/erts/process/gc/sweep.rs @@ -72,8 +72,7 @@ where let layout = Layout::from_size_align(words * mem::size_of::(), MIN_ALIGN) .unwrap() - .pad_to_align() - .unwrap(); + .pad_to_align(); let total_size = layout.size(); // Allocate space for move diff --git a/liblumen_alloc/src/erts/process/gc/young_heap.rs b/liblumen_alloc/src/erts/process/gc/young_heap.rs index 3463061d3..1f3a933b7 100644 --- a/liblumen_alloc/src/erts/process/gc/young_heap.rs +++ b/liblumen_alloc/src/erts/process/gc/young_heap.rs @@ -353,7 +353,7 @@ impl HeapAlloc for YoungHeap { unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult> { use liblumen_core::sys::sysconf::MIN_ALIGN; - let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap(); + let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align(); let needed = layout.size(); let available = self.heap_available() * mem::size_of::(); diff --git a/liblumen_alloc/src/erts/term/binary/heap.rs b/liblumen_alloc/src/erts/term/binary/heap.rs index a39b7b50f..f4920f0a8 100644 --- a/liblumen_alloc/src/erts/term/binary/heap.rs +++ b/liblumen_alloc/src/erts/term/binary/heap.rs @@ -90,7 +90,7 @@ impl HeapBin { // We pad to alignment so that the Layout produced here // matches that returned by `Layout::for_value` on the // final `HeapBin` - let layout = unpadded_layout.pad_to_align().unwrap(); + let layout = unpadded_layout.pad_to_align(); (layout, flags_offset, data_offset) } diff --git a/liblumen_alloc/src/erts/term/binary/process.rs b/liblumen_alloc/src/erts/term/binary/process.rs index e55520370..18d43569c 100644 --- a/liblumen_alloc/src/erts/term/binary/process.rs +++ b/liblumen_alloc/src/erts/term/binary/process.rs @@ -134,7 +134,7 @@ impl ProcBin { // We pad to alignment so that the Layout produced here // matches that returned by `Layout::for_value` on the // final `ProcBinInner` - let layout = unpadded_layout.pad_to_align().unwrap(); + let layout = unpadded_layout.pad_to_align(); unsafe { let non_null = sys_alloc::alloc(layout)?; diff --git a/liblumen_alloc/src/erts/term/closure.rs b/liblumen_alloc/src/erts/term/closure.rs index 7f38a35e4..92fd26445 100644 --- a/liblumen_alloc/src/erts/term/closure.rs +++ b/liblumen_alloc/src/erts/term/closure.rs @@ -59,7 +59,7 @@ impl ClosureLayout { let (layout, code_offset) = layout.extend(Layout::new::>()).unwrap(); let (layout, env_offset) = layout.extend(Layout::for_value(env)).unwrap(); - let layout = layout.pad_to_align().unwrap(); + let layout = layout.pad_to_align(); Self { layout, diff --git a/liblumen_alloc/src/erts/term/tuple.rs b/liblumen_alloc/src/erts/term/tuple.rs index 10e077219..ad84a7028 100644 --- a/liblumen_alloc/src/erts/term/tuple.rs +++ b/liblumen_alloc/src/erts/term/tuple.rs @@ -112,7 +112,7 @@ impl Tuple { // We pad to alignment so that the Layout produced here // matches that returned by `Layout::for_value` on the // final `Tuple` - let layout = base_layout.pad_to_align().unwrap(); + let layout = base_layout.pad_to_align(); (layout, data_offset) } diff --git a/liblumen_alloc/src/erts/testing.rs b/liblumen_alloc/src/erts/testing.rs index fa8d96baa..61f4a3b5a 100644 --- a/liblumen_alloc/src/erts/testing.rs +++ b/liblumen_alloc/src/erts/testing.rs @@ -142,7 +142,7 @@ impl HeapAlloc for RegionHeap { /// process heap during garbage collection unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult> { // Ensure layout has alignment padding - let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap(); + let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align(); // Capture the base pointer for this allocation let top = self.top; // Calculate available space and fail if not enough is free diff --git a/liblumen_eir_interpreter/src/exec/mod.rs b/liblumen_eir_interpreter/src/exec/mod.rs index 28ad3328a..8c3811f7c 100644 --- a/liblumen_eir_interpreter/src/exec/mod.rs +++ b/liblumen_eir_interpreter/src/exec/mod.rs @@ -313,7 +313,7 @@ impl CallExecutor { let mut exec = self; // Outer loop for optimized execution within the current function - 'outer: loop { + loop { // Insert block argument into environment let block_arg_vals = fun.fun.block_args(block); //trace!("{:?} {:?}", &block_arg_vals, &exec.next_args);