@@ -36,10 +36,10 @@ pub struct ntlmdata {
3636 pub target_info_len : ::core ::ffi ::c_uint ,
3737}
3838pub const true_0: ::core ::ffi ::c_int = 1 as ::core ::ffi ::c_int ;
39- pub const UINTPTR_MAX: :: core :: ffi :: c_ulong = 18446744073709551615 as :: core :: ffi :: c_ulong ;
39+ pub const UINTPTR_MAX: uintptr_t = 18446744073709551615 as uintptr_t ;
4040pub const LITERAL_INT: ::core ::ffi ::c_int = 0xffff as ::core ::ffi ::c_int ;
4141pub const LITERAL_BOOL: ::core ::ffi ::c_int = true_0 ;
42- pub const LITERAL_FLOAT: ::core ::ffi ::c_double = 3.14 f64 ;
42+ pub const LITERAL_FLOAT: ::core ::ffi ::c_float = 3.14 f32 ;
4343pub const LITERAL_CHAR: ::core ::ffi ::c_int = ' x' as i32 ;
4444pub const LITERAL_STR: [::core ::ffi ::c_char ; 6 ] =
4545 unsafe { ::core ::mem ::transmute ::< [u8 ; 6 ], [::core ::ffi ::c_char ; 6 ]> (* b " hello\0 " ) };
@@ -48,7 +48,7 @@ pub const LITERAL_STRUCT: S = S {
4848};
4949pub const NESTED_INT: ::core ::ffi ::c_int = LITERAL_INT ;
5050pub const NESTED_BOOL: ::core ::ffi ::c_int = LITERAL_BOOL ;
51- pub const NESTED_FLOAT: ::core ::ffi ::c_double = LITERAL_FLOAT ;
51+ pub const NESTED_FLOAT: ::core ::ffi ::c_float = LITERAL_FLOAT ;
5252pub const NESTED_CHAR: ::core ::ffi ::c_int = LITERAL_CHAR ;
5353pub const NESTED_STR: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
5454pub const NESTED_STRUCT: S = LITERAL_STRUCT ;
@@ -66,7 +66,7 @@ pub unsafe extern "C" fn local_muts() {
6666 unsafe {
6767 let mut literal_int: ::core ::ffi ::c_int = LITERAL_INT ;
6868 let mut literal_bool: bool = LITERAL_BOOL != 0 ;
69- let mut literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT as :: core :: ffi :: c_float ;
69+ let mut literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT ;
7070 let mut literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as ::core ::ffi ::c_char ;
7171 let mut literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
7272 let mut literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
@@ -78,7 +78,7 @@ pub unsafe extern "C" fn local_muts() {
7878 let mut literal_struct: S = LITERAL_STRUCT ;
7979 let mut nested_int: ::core ::ffi ::c_int = NESTED_INT ;
8080 let mut nested_bool: bool = NESTED_BOOL != 0 ;
81- let mut nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as :: core :: ffi :: c_float ;
81+ let mut nested_float: ::core ::ffi ::c_float = NESTED_FLOAT ;
8282 let mut nested_char: ::core ::ffi ::c_char = NESTED_CHAR as ::core ::ffi ::c_char ;
8383 let mut nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
8484 let mut nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
@@ -91,7 +91,7 @@ pub unsafe extern "C" fn local_muts() {
9191 let mut int_arithmetic: ::core ::ffi ::c_int =
9292 NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
9393 let mut mixed_arithmetic: ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
94- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
94+ + NESTED_FLOAT as :: core :: ffi :: c_double * LITERAL_CHAR as ::core ::ffi ::c_double
9595 - true_0 as ::core ::ffi ::c_double )
9696 as ::core ::ffi ::c_float ;
9797 let mut parens: ::core ::ffi ::c_int = PARENS ;
@@ -100,7 +100,7 @@ pub unsafe extern "C" fn local_muts() {
100100 let mut narrowing_cast: ::core ::ffi ::c_char = LITERAL_INT as ::core ::ffi ::c_char ;
101101 let mut conversion_cast: ::core ::ffi ::c_double = CONVERSION_CAST ;
102102 let mut indexing: ::core ::ffi ::c_char =
103- NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
103+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as usize ];
104104 let mut str_concatenation_ptr: *const ::core ::ffi ::c_char =
105105 b " hello hello world\0 " .as_ptr () as *const ::core ::ffi ::c_char ;
106106 let mut str_concatenation: [::core ::ffi ::c_char ; 18 ] =
@@ -109,7 +109,7 @@ pub unsafe extern "C" fn local_muts() {
109109 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
110110 let mut ref_indexing: *const ::core ::ffi ::c_char = NESTED_STR
111111 .as_ptr ()
112- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
112+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
113113 as *const ::core ::ffi ::c_char ;
114114 let mut ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
115115 let mut ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
@@ -122,9 +122,9 @@ pub unsafe extern "C" fn local_muts() {
122122 let mut builtin_0: ::core ::ffi ::c_int =
123123 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
124124 let mut indexing_0 : ::core ::ffi ::c_char =
125- NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
125+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as usize ];
126126 let mut mixed : ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
127- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
127+ + NESTED_FLOAT as :: core :: ffi :: c_double * LITERAL_CHAR as ::core ::ffi ::c_double
128128 - true_0 as ::core ::ffi ::c_double )
129129 as ::core ::ffi ::c_float ;
130130 let mut i : ::core ::ffi ::c_int = 0 as ::core ::ffi ::c_int ;
@@ -141,7 +141,7 @@ pub unsafe extern "C" fn local_consts() {
141141 unsafe {
142142 let literal_int: ::core ::ffi ::c_int = LITERAL_INT ;
143143 let literal_bool: bool = LITERAL_BOOL != 0 ;
144- let literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT as :: core :: ffi :: c_float ;
144+ let literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT ;
145145 let literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as ::core ::ffi ::c_char ;
146146 let literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
147147 let literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
@@ -153,7 +153,7 @@ pub unsafe extern "C" fn local_consts() {
153153 let literal_struct: S = LITERAL_STRUCT ;
154154 let nested_int: ::core ::ffi ::c_int = NESTED_INT ;
155155 let nested_bool: bool = NESTED_BOOL != 0 ;
156- let nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as :: core :: ffi :: c_float ;
156+ let nested_float: ::core ::ffi ::c_float = NESTED_FLOAT ;
157157 let nested_char: ::core ::ffi ::c_char = NESTED_CHAR as ::core ::ffi ::c_char ;
158158 let nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
159159 let nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
@@ -165,7 +165,7 @@ pub unsafe extern "C" fn local_consts() {
165165 let nested_struct: S = NESTED_STRUCT ;
166166 let int_arithmetic: ::core ::ffi ::c_int = NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
167167 let mixed_arithmetic: ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
168- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
168+ + NESTED_FLOAT as :: core :: ffi :: c_double * LITERAL_CHAR as ::core ::ffi ::c_double
169169 - true_0 as ::core ::ffi ::c_double )
170170 as ::core ::ffi ::c_float ;
171171 let parens: ::core ::ffi ::c_int = PARENS ;
@@ -174,7 +174,7 @@ pub unsafe extern "C" fn local_consts() {
174174 let narrowing_cast: ::core ::ffi ::c_char = LITERAL_INT as ::core ::ffi ::c_char ;
175175 let conversion_cast: ::core ::ffi ::c_double = CONVERSION_CAST ;
176176 let indexing: ::core ::ffi ::c_char =
177- NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
177+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as usize ];
178178 let str_concatenation_ptr: *const ::core ::ffi ::c_char =
179179 b " hello hello world\0 " .as_ptr () as *const ::core ::ffi ::c_char ;
180180 let str_concatenation: [::core ::ffi ::c_char ; 18 ] =
@@ -183,7 +183,7 @@ pub unsafe extern "C" fn local_consts() {
183183 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
184184 let ref_indexing: *const ::core ::ffi ::c_char = NESTED_STR
185185 .as_ptr ()
186- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
186+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
187187 as *const ::core ::ffi ::c_char ;
188188 let ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
189189 let ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
@@ -196,9 +196,9 @@ pub unsafe extern "C" fn local_consts() {
196196 let mut builtin_0: ::core ::ffi ::c_int =
197197 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
198198 let mut indexing_0 : ::core ::ffi ::c_char =
199- NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
199+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as usize ];
200200 let mut mixed : ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
201- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
201+ + NESTED_FLOAT as :: core :: ffi :: c_double * LITERAL_CHAR as ::core ::ffi ::c_double
202202 - true_0 as ::core ::ffi ::c_double )
203203 as ::core ::ffi ::c_float ;
204204 let mut i : ::core ::ffi ::c_int = 0 as ::core ::ffi ::c_int ;
@@ -212,8 +212,7 @@ pub unsafe extern "C" fn local_consts() {
212212}
213213static mut global_static_const_literal_int : ::core ::ffi ::c_int = LITERAL_INT ;
214214static mut global_static_const_literal_bool : bool = LITERAL_BOOL != 0 ;
215- static mut global_static_const_literal_float : ::core ::ffi ::c_float =
216- LITERAL_FLOAT as ::core ::ffi ::c_float ;
215+ static mut global_static_const_literal_float : ::core ::ffi ::c_float = LITERAL_FLOAT ;
217216static mut global_static_const_literal_char : ::core ::ffi ::c_char =
218217 LITERAL_CHAR as ::core ::ffi ::c_char ;
219218static mut global_static_const_literal_str_ptr : * const ::core: :ffi ::c_char = LITERAL_STR .as_ptr ();
@@ -226,8 +225,7 @@ static mut global_static_const_literal_array: [::core::ffi::c_int; 3] = [
226225static mut global_static_const_literal_struct : S = LITERAL_STRUCT ;
227226static mut global_static_const_nested_int : ::core ::ffi ::c_int = NESTED_INT ;
228227static mut global_static_const_nested_bool : bool = NESTED_BOOL != 0 ;
229- static mut global_static_const_nested_float : ::core ::ffi ::c_float =
230- NESTED_FLOAT as ::core ::ffi ::c_float ;
228+ static mut global_static_const_nested_float : ::core ::ffi ::c_float = NESTED_FLOAT ;
231229static mut global_static_const_nested_char : ::core ::ffi ::c_char =
232230 NESTED_CHAR as ::core ::ffi ::c_char ;
233231static mut global_static_const_nested_str_ptr : * const ::core: :ffi ::c_char = NESTED_STR .as_ptr ();
@@ -241,7 +239,8 @@ static mut global_static_const_nested_struct: S = NESTED_STRUCT;
241239static mut global_static_const_int_arithmetic : ::core ::ffi ::c_int =
242240 NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
243241static mut global_static_const_mixed_arithmetic : ::core ::ffi ::c_float =
244- (LITERAL_INT as ::core ::ffi ::c_double + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
242+ (LITERAL_INT as ::core ::ffi ::c_double
243+ + NESTED_FLOAT as ::core ::ffi ::c_double * LITERAL_CHAR as ::core ::ffi ::c_double
245244 - true_0 as ::core ::ffi ::c_double ) as ::core ::ffi ::c_float ;
246245static mut global_static_const_parens : ::core ::ffi ::c_int = PARENS ;
247246static mut global_static_const_ptr_arithmetic : * const ::core: :ffi ::c_char =
@@ -270,8 +269,7 @@ pub static mut global_const_literal_int: ::core::ffi::c_int = LITERAL_INT;
270269#[no_mangle ]
271270pub static mut global_const_literal_bool : bool = LITERAL_BOOL != 0 ;
272271#[no_mangle ]
273- pub static mut global_const_literal_float : ::core ::ffi ::c_float =
274- LITERAL_FLOAT as ::core ::ffi ::c_float ;
272+ pub static mut global_const_literal_float : ::core ::ffi ::c_float = LITERAL_FLOAT ;
275273#[no_mangle ]
276274pub static mut global_const_literal_char : ::core ::ffi ::c_char = LITERAL_CHAR as ::core ::ffi ::c_char ;
277275#[no_mangle ]
@@ -291,8 +289,7 @@ pub static mut global_const_nested_int: ::core::ffi::c_int = NESTED_INT;
291289#[no_mangle ]
292290pub static mut global_const_nested_bool : bool = NESTED_BOOL != 0 ;
293291#[no_mangle ]
294- pub static mut global_const_nested_float : ::core ::ffi ::c_float =
295- NESTED_FLOAT as ::core ::ffi ::c_float ;
292+ pub static mut global_const_nested_float : ::core ::ffi ::c_float = NESTED_FLOAT ;
296293#[no_mangle ]
297294pub static mut global_const_nested_char : ::core ::ffi ::c_char = NESTED_CHAR as ::core ::ffi ::c_char ;
298295#[no_mangle ]
@@ -312,7 +309,8 @@ pub static mut global_const_int_arithmetic: ::core::ffi::c_int =
312309 NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
313310#[no_mangle ]
314311pub static mut global_const_mixed_arithmetic : ::core ::ffi ::c_float =
315- (LITERAL_INT as ::core ::ffi ::c_double + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
312+ (LITERAL_INT as ::core ::ffi ::c_double
313+ + NESTED_FLOAT as ::core ::ffi ::c_double * LITERAL_CHAR as ::core ::ffi ::c_double
316314 - true_0 as ::core ::ffi ::c_double ) as ::core ::ffi ::c_float ;
317315#[no_mangle ]
318316pub static mut global_const_parens : ::core ::ffi ::c_int = PARENS ;
@@ -447,8 +445,7 @@ pub unsafe extern "C" fn use_local_value() -> ::core::ffi::c_int {
447445#[no_mangle]
448446pub unsafe extern "C" fn use_portable_type(mut len: uintptr_t) -> bool {
449447 unsafe {
450- return len
451- <= (UINTPTR_MAX as uintptr_t ).wrapping_div (2 as ::core ::ffi ::c_int as uintptr_t );
448+ return len <= UINTPTR_MAX .wrapping_div (2 as ::core ::ffi ::c_int as uintptr_t );
452449 }
453450}
454451#[no_mangle]
@@ -472,10 +469,11 @@ pub unsafe extern "C" fn late_init_var() -> ::core::ffi::c_int {
472469unsafe extern "C" fn c2rust_run_static_initializers() {
473470 unsafe {
474471 global_static_const_ptr_arithmetic = PTR_ARITHMETIC;
475- global_static_const_indexing = NESTED_STR[LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
472+ global_static_const_indexing =
473+ NESTED_STR[LITERAL_FLOAT as ::core ::ffi ::c_double as ::core ::ffi ::c_int as usize ];
476474 global_static_const_ref_indexing = NESTED_STR
477475 .as_ptr ()
478- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
476+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
479477 as *const ::core ::ffi ::c_char ;
480478 global_static_const_ternary = if LITERAL_BOOL != 0 {
481479 1 as ::core ::ffi ::c_int
@@ -484,10 +482,11 @@ unsafe extern "C" fn c2rust_run_static_initializers() {
484482 };
485483 global_static_const_member = LITERAL_STRUCT .i ;
486484 global_const_ptr_arithmetic = PTR_ARITHMETIC ;
487- global_const_indexing = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
485+ global_const_indexing =
486+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as ::core ::ffi ::c_int as usize ];
488487 global_const_ref_indexing = NESTED_STR
489488 .as_ptr ()
490- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
489+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
491490 as *const ::core ::ffi ::c_char ;
492491 global_const_ternary = if LITERAL_BOOL != 0 {
493492 1 as ::core ::ffi ::c_int
0 commit comments