From c404598296a05c517ca63557cd3a91e44cafd140 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 7 Sep 2025 13:26:04 +0200 Subject: [PATCH] Use cfg!() rather than #[cfg] for the cfg in map_memory --- src/startup/memory.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/startup/memory.rs b/src/startup/memory.rs index 1cc7eff529..5d14d10ead 100644 --- a/src/startup/memory.rs +++ b/src/startup/memory.rs @@ -276,8 +276,7 @@ unsafe fn map_memory(areas: &[MemoryArea], mut bump_allocator: &mut Bum let mut mapper = PageMapper::::create(TableKind::Kernel, &mut bump_allocator) .expect("failed to create Mapper"); - #[cfg(target_arch = "x86")] - { + if cfg!(target_arch = "x86") { // Pre-allocate all kernel PD entries so that when the page table is copied, // these entries are synced between processes for i in 512..1024 {