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"
2828[features ]
2929default = [" nightly" , " instructions" ]
3030instructions = []
31- nightly = [ " const_fn" , " step_trait" , " abi_x86_interrupt" , " asm_const" ]
31+ nightly = [" const_fn" , " step_trait" , " abi_x86_interrupt" , " asm_const" ]
3232abi_x86_interrupt = []
33+ # deprecated, no longer needed
3334const_fn = []
3435asm_const = []
3536step_trait = []
Original file line number Diff line number Diff line change 22//! and access to various system registers.
33
44#![ cfg_attr( not( test) , no_std) ]
5- #![ cfg_attr( feature = "const_fn" , feature( const_mut_refs) ) ] // GDT::append()
65#![ cfg_attr( feature = "abi_x86_interrupt" , feature( abi_x86_interrupt) ) ]
76#![ cfg_attr( feature = "step_trait" , feature( step_trait) ) ]
87#![ 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> {
193193 ///
194194 /// Panics if the GDT doesn't have enough free entries.
195195 #[ 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 {
198197 let index = match entry {
199198 Descriptor :: UserSegment ( value) => {
200199 if self . len > self . table . len ( ) . saturating_sub ( 1 ) {
@@ -246,8 +245,7 @@ impl<const MAX: usize> GlobalDescriptorTable<MAX> {
246245 }
247246
248247 #[ 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 {
251249 let index = self . len ;
252250 self . table [ index] = Entry :: new ( value) ;
253251 self . len += 1 ;
You can’t perform that action at this time.
0 commit comments