File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ macro_rules! newtype_index {
136136 ] ;
137137
138138 unsafe {
139- $type:: from_u32_unchecked ( value)
139+ $type { private : value }
140140 }
141141 }
142142
@@ -153,13 +153,13 @@ macro_rules! newtype_index {
153153
154154 /// Extract value of this index as a usize.
155155 #[ inline]
156- $v const fn as_u32( self ) -> u32 {
156+ $v fn as_u32( self ) -> u32 {
157157 self . private
158158 }
159159
160160 /// Extract value of this index as a u32.
161161 #[ inline]
162- $v const fn as_usize( self ) -> usize {
162+ $v fn as_usize( self ) -> usize {
163163 self . as_u32( ) as usize
164164 }
165165 }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
2424#![ feature( box_syntax) ]
2525#![ feature( crate_visibility_modifier) ]
2626#![ feature( core_intrinsics) ]
27+ #![ feature( const_fn) ]
2728#![ feature( decl_macro) ]
2829#![ cfg_attr( stage0, feature( macro_vis_matcher) ) ]
2930#![ feature( exhaustive_patterns) ]
You can’t perform that action at this time.
0 commit comments