Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 789a6b9

Browse files
committed
Update nightly
Updated to `nightly-x86_64-apple-darwin updated - rustc 1.41.0-nightly (19bd93467 2019-12-18)`. It includes rust-lang/rust#66256, which removed the `unwrap` on `align_to_pad`.
1 parent 88469d6 commit 789a6b9

File tree

11 files changed

+12
-13
lines changed

11 files changed

+12
-13
lines changed

liblumen_alloc/src/blocks/free_block_tree.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl FreeBlocks {
5454
let mut cursor = self.addr_tree.front();
5555
let mut result = None;
5656

57-
let aligned = layout.pad_to_align().unwrap();
57+
let aligned = layout.pad_to_align();
5858
let requested = aligned.size();
5959

6060
while let Some(block) = cursor.get() {
@@ -77,7 +77,7 @@ impl FreeBlocks {
7777
let mut result = None;
7878
let mut best_size = 0;
7979

80-
let aligned = layout.pad_to_align().unwrap();
80+
let aligned = layout.pad_to_align();
8181
let requested = aligned.size();
8282

8383
match self.order {

liblumen_alloc/src/erts/fragment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl HeapAlloc for HeapFragment {
123123
use liblumen_core::sys::sysconf::MIN_ALIGN;
124124

125125
// Ensure layout has alignment padding
126-
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap();
126+
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align();
127127
// Capture the base pointer for this allocation
128128
let top = self.heap_top() as *mut u8;
129129
// Calculate available space and fail if not enough is free

liblumen_alloc/src/erts/process/gc/old_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl HeapAlloc for OldHeap {
8585
unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult<NonNull<Term>> {
8686
use liblumen_core::sys::sysconf::MIN_ALIGN;
8787

88-
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap();
88+
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align();
8989

9090
let needed = layout.size();
9191
let available = self.heap_available() * mem::size_of::<Term>();

liblumen_alloc/src/erts/process/gc/sweep.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ where
7272

7373
let layout = Layout::from_size_align(words * mem::size_of::<Term>(), MIN_ALIGN)
7474
.unwrap()
75-
.pad_to_align()
76-
.unwrap();
75+
.pad_to_align();
7776
let total_size = layout.size();
7877

7978
// Allocate space for move

liblumen_alloc/src/erts/process/gc/young_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl HeapAlloc for YoungHeap {
353353
unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult<NonNull<Term>> {
354354
use liblumen_core::sys::sysconf::MIN_ALIGN;
355355

356-
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap();
356+
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align();
357357

358358
let needed = layout.size();
359359
let available = self.heap_available() * mem::size_of::<Term>();

liblumen_alloc/src/erts/term/binary/heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl HeapBin {
9090
// We pad to alignment so that the Layout produced here
9191
// matches that returned by `Layout::for_value` on the
9292
// final `HeapBin`
93-
let layout = unpadded_layout.pad_to_align().unwrap();
93+
let layout = unpadded_layout.pad_to_align();
9494

9595
(layout, flags_offset, data_offset)
9696
}

liblumen_alloc/src/erts/term/binary/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl ProcBin {
134134
// We pad to alignment so that the Layout produced here
135135
// matches that returned by `Layout::for_value` on the
136136
// final `ProcBinInner`
137-
let layout = unpadded_layout.pad_to_align().unwrap();
137+
let layout = unpadded_layout.pad_to_align();
138138

139139
unsafe {
140140
let non_null = sys_alloc::alloc(layout)?;

liblumen_alloc/src/erts/term/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl ClosureLayout {
5959
let (layout, code_offset) = layout.extend(Layout::new::<Option<Code>>()).unwrap();
6060
let (layout, env_offset) = layout.extend(Layout::for_value(env)).unwrap();
6161

62-
let layout = layout.pad_to_align().unwrap();
62+
let layout = layout.pad_to_align();
6363

6464
Self {
6565
layout,

liblumen_alloc/src/erts/term/tuple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Tuple {
112112
// We pad to alignment so that the Layout produced here
113113
// matches that returned by `Layout::for_value` on the
114114
// final `Tuple`
115-
let layout = base_layout.pad_to_align().unwrap();
115+
let layout = base_layout.pad_to_align();
116116

117117
(layout, data_offset)
118118
}

liblumen_alloc/src/erts/testing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl HeapAlloc for RegionHeap {
142142
/// process heap during garbage collection
143143
unsafe fn alloc_layout(&mut self, layout: Layout) -> AllocResult<NonNull<Term>> {
144144
// Ensure layout has alignment padding
145-
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align().unwrap();
145+
let layout = layout.align_to(MIN_ALIGN).unwrap().pad_to_align();
146146
// Capture the base pointer for this allocation
147147
let top = self.top;
148148
// Calculate available space and fail if not enough is free

liblumen_eir_interpreter/src/exec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ impl CallExecutor {
313313

314314
let mut exec = self;
315315
// Outer loop for optimized execution within the current function
316-
'outer: loop {
316+
loop {
317317
// Insert block argument into environment
318318
let block_arg_vals = fun.fun.block_args(block);
319319
//trace!("{:?} {:?}", &block_arg_vals, &exec.next_args);

0 commit comments

Comments
 (0)