File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ rustversion = "1.0.5"
28
28
[features ]
29
29
default = [" nightly" , " instructions" ]
30
30
instructions = []
31
- nightly = [ " const_fn" , " step_trait" , " abi_x86_interrupt" , " asm_const" ]
31
+ nightly = [" const_fn" , " step_trait" , " abi_x86_interrupt" , " asm_const" ]
32
32
abi_x86_interrupt = []
33
+ # deprecated, no longer needed
33
34
const_fn = []
34
35
asm_const = []
35
36
step_trait = []
Original file line number Diff line number Diff line change 2
2
//! and access to various system registers.
3
3
4
4
#![ cfg_attr( not( test) , no_std) ]
5
- #![ cfg_attr( feature = "const_fn" , feature( const_mut_refs) ) ] // GDT::append()
6
5
#![ cfg_attr( feature = "abi_x86_interrupt" , feature( abi_x86_interrupt) ) ]
7
6
#![ cfg_attr( feature = "step_trait" , feature( step_trait) ) ]
8
7
#![ cfg_attr( feature = "doc_auto_cfg" , feature( doc_auto_cfg) ) ]
Original file line number Diff line number Diff line change @@ -193,8 +193,7 @@ impl<const MAX: usize> GlobalDescriptorTable<MAX> {
193
193
///
194
194
/// Panics if the GDT doesn't have enough free entries.
195
195
#[ inline]
196
- #[ cfg_attr( feature = "const_fn" , rustversion:: attr( all( ) , const ) ) ]
197
- pub fn append ( & mut self , entry : Descriptor ) -> SegmentSelector {
196
+ pub const fn append ( & mut self , entry : Descriptor ) -> SegmentSelector {
198
197
let index = match entry {
199
198
Descriptor :: UserSegment ( value) => {
200
199
if self . len > self . table . len ( ) . saturating_sub ( 1 ) {
@@ -246,8 +245,7 @@ impl<const MAX: usize> GlobalDescriptorTable<MAX> {
246
245
}
247
246
248
247
#[ inline]
249
- #[ cfg_attr( feature = "const_fn" , rustversion:: attr( all( ) , const ) ) ]
250
- fn push ( & mut self , value : u64 ) -> usize {
248
+ const fn push ( & mut self , value : u64 ) -> usize {
251
249
let index = self . len ;
252
250
self . table [ index] = Entry :: new ( value) ;
253
251
self . len += 1 ;
You can’t perform that action at this time.
0 commit comments