File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ impl VirtAddr {
240
240
}
241
241
242
242
// FIXME: Move this into the `Step` impl, once `Step` is stabilized.
243
+ #[ cfg( any( feature = "instructions" , feature = "step_trait" ) ) ]
243
244
pub ( crate ) fn steps_between_impl ( start : & Self , end : & Self ) -> Option < usize > {
244
245
let mut steps = end. 0 . checked_sub ( start. 0 ) ?;
245
246
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use bitflags::bitflags;
6
6
use crate :: registers:: segmentation:: { FS , GS } ;
7
7
8
8
/// A model specific register.
9
+ #[ cfg_attr( not( feature = "instructions" ) , allow( dead_code) ) ] // FIXME
9
10
#[ derive( Debug ) ]
10
11
pub struct Msr ( u32 ) ;
11
12
Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ pub trait Mapper<S: PageSize> {
383
383
/// changed the mapping of a page to ensure that the TLB flush is not forgotten.
384
384
#[ derive( Debug ) ]
385
385
#[ must_use = "Page Table changes must be flushed or ignored." ]
386
+ #[ cfg_attr( not( feature = "instructions" ) , allow( dead_code) ) ] // FIXME
386
387
pub struct MapperFlush < S : PageSize > ( Page < S > ) ;
387
388
388
389
impl < S : PageSize > MapperFlush < S > {
Original file line number Diff line number Diff line change @@ -159,12 +159,14 @@ impl<S: PageSize> Page<S> {
159
159
}
160
160
161
161
// FIXME: Move this into the `Step` impl, once `Step` is stabilized.
162
+ #[ cfg( any( feature = "instructions" , feature = "step_trait" ) ) ]
162
163
pub ( crate ) fn steps_between_impl ( start : & Self , end : & Self ) -> Option < usize > {
163
164
VirtAddr :: steps_between_impl ( & start. start_address , & end. start_address )
164
165
. map ( |steps| steps / S :: SIZE as usize )
165
166
}
166
167
167
168
// FIXME: Move this into the `Step` impl, once `Step` is stabilized.
169
+ #[ cfg( any( feature = "instructions" , feature = "step_trait" ) ) ]
168
170
pub ( crate ) fn forward_checked_impl ( start : Self , count : usize ) -> Option < Self > {
169
171
let count = count. checked_mul ( S :: SIZE as usize ) ?;
170
172
let start_address = VirtAddr :: forward_checked_impl ( start. start_address , count) ?;
You can’t perform that action at this time.
0 commit comments