File tree 3 files changed +5
-8
lines changed
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 10
10
#![ crate_name="string_cache_plugin" ]
11
11
#![ crate_type="dylib" ]
12
12
13
- #![ feature( plugin_registrar, quote, box_syntax, static_assert ) ]
13
+ #![ feature( plugin_registrar, quote, box_syntax) ]
14
14
#![ feature( rustc_private, slice_patterns) ]
15
15
#![ deny( warnings) ]
16
16
#![ allow( unused_imports) ] // for quotes
Original file line number Diff line number Diff line change 11
11
//! the macros crate and the run-time library, in order to guarantee
12
12
//! consistency.
13
13
14
- #![ feature( core, static_assert ) ]
14
+ #![ feature( core) ]
15
15
#![ deny( warnings) ]
16
16
17
17
use std:: { mem, raw, intrinsics} ;
@@ -42,11 +42,9 @@ pub enum UnpackedAtom {
42
42
43
43
const STATIC_SHIFT_BITS : usize = 32 ;
44
44
45
+ #[ cfg( target_endian = "little" ) ] // Not implemented yet for big-endian
45
46
#[ inline( always) ]
46
47
unsafe fn inline_atom_slice ( x : & u64 ) -> raw:: Slice < u8 > {
47
- #[ static_assert]
48
- const _IS_LITTLE_ENDIAN: bool = cfg ! ( target_endian = "little" ) ;
49
-
50
48
let x: * const u64 = x;
51
49
raw:: Slice {
52
50
data : ( x as * const u8 ) . offset ( 1 ) ,
@@ -82,8 +80,7 @@ impl UnpackedAtom {
82
80
83
81
#[ inline( always) ]
84
82
pub unsafe fn from_packed ( data : u64 ) -> UnpackedAtom {
85
- #[ static_assert]
86
- const _DYNAMIC_IS_UNTAGGED: bool = DYNAMIC_TAG == 0 ;
83
+ debug_assert ! ( DYNAMIC_TAG == 0 ) ; // Dynamic is untagged
87
84
88
85
match ( data & 0xf ) as u8 {
89
86
DYNAMIC_TAG => Dynamic ( data as * mut ( ) ) ,
Original file line number Diff line number Diff line change 10
10
#![ crate_name = "string_cache" ]
11
11
#![ crate_type = "rlib" ]
12
12
13
- #![ feature( plugin, unsafe_no_drop_flag, static_assert ) ]
13
+ #![ feature( plugin, unsafe_no_drop_flag) ]
14
14
#![ feature( core, collections, alloc, hash) ]
15
15
#![ deny( warnings) ]
16
16
#![ cfg_attr( test, feature( test) ) ]
You can’t perform that action at this time.
0 commit comments