Skip to content

Commit 8f9cb5c

Browse files
committed
Fix pointer_width -> target_pointer_width, make doc tests check for instructions feature (required by flush)
1 parent c1eafd6 commit 8f9cb5c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/structures/paging/mapper/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Abstractions for reading and modifying the mapping of pages.
22
33
pub use self::mapped_page_table::{MappedPageTable, PhysToVirt};
4-
#[cfg(pointer_width = "64")]
4+
#[cfg(target_pointer_width = "64")]
55
pub use self::offset_page_table::OffsetPageTable;
66
#[cfg(feature = "instructions")]
77
pub use self::recursive_page_table::RecursivePageTable;
@@ -127,12 +127,12 @@ pub trait Mapper<S: PageSize> {
127127
/// Create a USER_ACCESSIBLE mapping:
128128
///
129129
/// ```
130-
/// # #[cfg(pointer_width = "64")]
130+
/// # #[cfg(feature = "instructions")]
131131
/// # use x86_64::structures::paging::{
132132
/// # Mapper, Page, PhysFrame, FrameAllocator,
133133
/// # Size4KiB, OffsetPageTable, page_table::PageTableFlags
134134
/// # };
135-
/// # #[cfg(pointer_width = "64")]
135+
/// # #[cfg(feature = "instructions")]
136136
/// # unsafe fn test(mapper: &mut OffsetPageTable, frame_allocator: &mut impl FrameAllocator<Size4KiB>,
137137
/// # page: Page<Size4KiB>, frame: PhysFrame) {
138138
/// mapper
@@ -214,12 +214,12 @@ pub trait Mapper<S: PageSize> {
214214
/// the top hierarchy only with USER_ACCESSIBLE:
215215
///
216216
/// ```
217-
/// # #[cfg(pointer_width = "64")]
217+
/// # #[cfg(feature = "instructions")]
218218
/// # use x86_64::structures::paging::{
219219
/// # Mapper, PhysFrame, Page, FrameAllocator,
220220
/// # Size4KiB, OffsetPageTable, page_table::PageTableFlags
221221
/// # };
222-
/// # #[cfg(pointer_width = "64")]
222+
/// # #[cfg(feature = "instructions")]
223223
/// # unsafe fn test(mapper: &mut OffsetPageTable, frame_allocator: &mut impl FrameAllocator<Size4KiB>,
224224
/// # page: Page<Size4KiB>, frame: PhysFrame) {
225225
/// mapper

src/structures/paging/mapper/offset_page_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(pointer_width = "64")]
1+
#![cfg(target_pointer_width = "64")]
22

33
use crate::structures::paging::{
44
frame::PhysFrame, mapper::*, page_table::PageTable, Page, PageTableFlags,

src/structures/paging/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub use self::frame_alloc::UnusedPhysFrame;
88
pub use self::frame_alloc::{FrameAllocator, FrameDeallocator};
99
#[doc(no_inline)]
1010
pub use self::mapper::MappedPageTable;
11-
#[cfg(pointer_width = "64")]
11+
#[cfg(target_pointer_width = "64")]
1212
#[doc(no_inline)]
1313
pub use self::mapper::OffsetPageTable;
1414
#[cfg(feature = "instructions")]

0 commit comments

Comments
 (0)