Skip to content

Commit 4844cdd

Browse files
retragerbradford
authored andcommitted
build: Remove const_in_array_repeat_expressions
The `const_in_array_repeat_expressions` feature has been removed from Rust [rust-lang/rust #80404](rust-lang/rust#80404). Signed-off-by: Akira Moroo <retrage01@gmail.com>
1 parent 6bdef4a commit 4844cdd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#![feature(alloc_error_handler)]
16-
#![feature(global_asm, const_in_array_repeat_expressions)]
16+
#![feature(global_asm)]
1717
#![cfg_attr(not(test), no_std)]
1818
#![cfg_attr(not(test), no_main)]
1919
#![cfg_attr(test, allow(unused_imports, dead_code))]

src/paging.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ use x86_64::{
66

77
// Amount of memory we identity map in setup(), max 512 GiB.
88
const ADDRESS_SPACE_GIB: usize = 4;
9+
const TABLE: PageTable = PageTable::new();
910

1011
// Put the Page Tables in static muts to make linking easier
1112
#[no_mangle]
1213
static mut L4_TABLE: PageTable = PageTable::new();
1314
#[no_mangle]
1415
static mut L3_TABLE: PageTable = PageTable::new();
1516
#[no_mangle]
16-
static mut L2_TABLES: [PageTable; ADDRESS_SPACE_GIB] = [PageTable::new(); ADDRESS_SPACE_GIB];
17+
static mut L2_TABLES: [PageTable; ADDRESS_SPACE_GIB] = [TABLE; ADDRESS_SPACE_GIB];
1718

1819
pub fn setup() {
1920
// SAFETY: This function is idempontent and only writes to static memory and

0 commit comments

Comments
 (0)