Skip to content

Commit c1eafd6

Browse files
committed
Test for pointer_width in doc tests
1 parent 2c70f6a commit c1eafd6

File tree

1 file changed

+4
-0
lines changed
  • src/structures/paging/mapper

1 file changed

+4
-0
lines changed

src/structures/paging/mapper/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ pub trait Mapper<S: PageSize> {
127127
/// Create a USER_ACCESSIBLE mapping:
128128
///
129129
/// ```
130+
/// # #[cfg(pointer_width = "64")]
130131
/// # use x86_64::structures::paging::{
131132
/// # Mapper, Page, PhysFrame, FrameAllocator,
132133
/// # Size4KiB, OffsetPageTable, page_table::PageTableFlags
133134
/// # };
135+
/// # #[cfg(pointer_width = "64")]
134136
/// # unsafe fn test(mapper: &mut OffsetPageTable, frame_allocator: &mut impl FrameAllocator<Size4KiB>,
135137
/// # page: Page<Size4KiB>, frame: PhysFrame) {
136138
/// mapper
@@ -212,10 +214,12 @@ pub trait Mapper<S: PageSize> {
212214
/// the top hierarchy only with USER_ACCESSIBLE:
213215
///
214216
/// ```
217+
/// # #[cfg(pointer_width = "64")]
215218
/// # use x86_64::structures::paging::{
216219
/// # Mapper, PhysFrame, Page, FrameAllocator,
217220
/// # Size4KiB, OffsetPageTable, page_table::PageTableFlags
218221
/// # };
222+
/// # #[cfg(pointer_width = "64")]
219223
/// # unsafe fn test(mapper: &mut OffsetPageTable, frame_allocator: &mut impl FrameAllocator<Size4KiB>,
220224
/// # page: Page<Size4KiB>, frame: PhysFrame) {
221225
/// mapper

0 commit comments

Comments
 (0)