@@ -30,35 +30,31 @@ pub struct fn_ptrs {
30
30
pub fn2 : Option < unsafe extern " C" fn (std ::ffi ::c_int ) - > std ::ffi ::c_int > ,
31
31
}
32
32
pub type zstd_platform_dependent_type = std ::ffi ::c_long ;
33
- pub const UINTPTR_MAX: std ::ffi ::c_ulong = unsafe { 18446744073709551615 as std::ffi ::c_ulong };
34
- pub const true_0: std ::ffi ::c_int = unsafe { 1 as std::ffi ::c_int };
35
- pub const LITERAL_INT: std ::ffi ::c_int = unsafe { 0xffff as std::ffi ::c_int };
36
- pub const LITERAL_BOOL: std ::ffi ::c_int = unsafe { true_0 };
37
- pub const LITERAL_FLOAT: std ::ffi ::c_double = unsafe { 3.14f64 };
38
- pub const LITERAL_CHAR: std ::ffi ::c_int = unsafe { 'x' as i32 };
39
- pub const LITERAL_STRUCT: S = unsafe {
40
- {
41
- let mut init = S {
42
- i: 5 as std ::ffi ::c_int ,
43
- };
44
- init
45
- }
33
+ pub const UINTPTR_MAX: std ::ffi ::c_ulong = 18446744073709551615 as std ::ffi ::c_ulong ;
34
+ pub const true_0: std ::ffi ::c_int = 1 as std ::ffi ::c_int ;
35
+ pub const LITERAL_INT: std ::ffi ::c_int = 0xffff as std ::ffi ::c_int ;
36
+ pub const LITERAL_BOOL: std ::ffi ::c_int = true_0 ;
37
+ pub const LITERAL_FLOAT: std ::ffi ::c_double = 3.14f64 ;
38
+ pub const LITERAL_CHAR: std ::ffi ::c_int = ' x' as i32 ;
39
+ pub const LITERAL_STRUCT: S = {
40
+ let mut init = S {
41
+ i: 5 as std ::ffi ::c_int ,
42
+ };
43
+ init
46
44
};
47
- pub const NESTED_INT: std ::ffi ::c_int = unsafe { LITERAL_INT };
48
- pub const NESTED_BOOL: std ::ffi ::c_int = unsafe { 1 as std::ffi ::c_int };
49
- pub const NESTED_FLOAT: std ::ffi ::c_double = unsafe { LITERAL_FLOAT };
50
- pub const NESTED_CHAR: std ::ffi ::c_int = unsafe { 'x' as i32 };
51
- pub const NESTED_STRUCT: S = unsafe {
52
- {
53
- let mut init = S {
54
- i: 5 as std ::ffi ::c_int ,
55
- };
56
- init
57
- }
45
+ pub const NESTED_INT: std ::ffi ::c_int = LITERAL_INT ;
46
+ pub const NESTED_BOOL: std ::ffi ::c_int = 1 as std ::ffi ::c_int ;
47
+ pub const NESTED_FLOAT: std ::ffi ::c_double = LITERAL_FLOAT ;
48
+ pub const NESTED_CHAR: std ::ffi ::c_int = ' x' as i32 ;
49
+ pub const NESTED_STRUCT: S = {
50
+ let mut init = S {
51
+ i: 5 as std ::ffi ::c_int ,
52
+ };
53
+ init
58
54
};
59
- pub const PARENS: std ::ffi ::c_int = unsafe { NESTED_INT * (LITERAL_CHAR + true_0 ) } ;
60
- pub const WIDENING_CAST: std ::ffi ::c_int = unsafe { LITERAL_INT } ;
61
- pub const CONVERSION_CAST: std ::ffi ::c_int = unsafe { LITERAL_INT } ;
55
+ pub const PARENS: std ::ffi ::c_int = NESTED_INT * (LITERAL_CHAR + true_0 );
56
+ pub const WIDENING_CAST: std ::ffi ::c_int = LITERAL_INT ;
57
+ pub const CONVERSION_CAST: std ::ffi ::c_int = LITERAL_INT ;
62
58
#[no_mangle ]
63
59
pub unsafe extern " C" fn local_muts () {
64
60
let mut literal_int: std ::ffi ::c_int = LITERAL_INT ;
@@ -324,11 +320,11 @@ pub static mut global_const_member: std::ffi::c_int = 0;
324
320
pub unsafe extern " C" fn test_fn_macro (mut x : std ::ffi ::c_int ) - > std ::ffi ::c_int {
325
321
return x * x ;
326
322
}
327
- pub const TEST_CONST1: std ::ffi ::c_int = unsafe { 1 as std::ffi ::c_int } ;
328
- pub const TEST_NESTED: std ::ffi ::c_int = unsafe { 2 as std::ffi ::c_int } ;
329
- pub const TEST_CONST2: std ::ffi ::c_int = unsafe { TEST_NESTED } ;
323
+ pub const TEST_CONST1: std ::ffi ::c_int = 1 as std ::ffi ::c_int ;
324
+ pub const TEST_NESTED: std ::ffi ::c_int = 2 as std ::ffi ::c_int ;
325
+ pub const TEST_CONST2: std ::ffi ::c_int = TEST_NESTED ;
330
326
pub const TEST_PARENS: std ::ffi ::c_int =
331
- unsafe { (TEST_CONST2 + 1 as std ::ffi ::c_int ) * 3 as std ::ffi ::c_int } ;
327
+ (TEST_CONST2 + 1 as std ::ffi ::c_int ) * 3 as std ::ffi ::c_int ;
332
328
#[no_mangle ]
333
329
pub unsafe extern " C" fn reference_define () - > std ::ffi ::c_int {
334
330
let mut x: std ::ffi ::c_int = TEST_CONST1 ;
@@ -349,8 +345,8 @@ pub static mut fns: fn_ptrs = {
349
345
};
350
346
#[no_mangle ]
351
347
pub static mut p : * const fn_ptrs = unsafe { &fns as *const fn_ptrs };
352
- pub const ZSTD_WINDOWLOG_MAX_32: std ::ffi ::c_int = unsafe { 30 as std::ffi ::c_int } ;
353
- pub const ZSTD_WINDOWLOG_MAX_64: std ::ffi ::c_int = unsafe { 31 as std::ffi ::c_int } ;
348
+ pub const ZSTD_WINDOWLOG_MAX_32: std ::ffi ::c_int = 30 as std ::ffi ::c_int ;
349
+ pub const ZSTD_WINDOWLOG_MAX_64: std ::ffi ::c_int = 31 as std ::ffi ::c_int ;
354
350
#[no_mangle ]
355
351
pub unsafe extern " C" fn test_zstd () - > U64 {
356
352
return (if ::core ::mem ::size_of ::<zstd_platform_dependent_type >() as std::ffi::c_ulong
@@ -386,7 +382,7 @@ pub unsafe extern "C" fn test_switch(mut x: std::ffi::c_int) -> std::ffi::c_int
386
382
}
387
383
return 0 as std::ffi::c_int;
388
384
}
389
- pub const silk_int16_MIN: std::ffi::c_int = unsafe { 0x8000 as std ::ffi ::c_int } ;
385
+ pub const silk_int16_MIN: std::ffi::c_int = 0x8000 as std::ffi::c_int;
390
386
#[no_mangle]
391
387
pub unsafe extern "C" fn test_silk_int16_MIN() -> std::ffi::c_int {
392
388
let mut _null : std ::ffi ::c_char =
0 commit comments