@@ -36,23 +36,23 @@ 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 ;
43- pub const LITERAL_CHAR: ::core ::ffi ::c_int = ' x' as ::core ::ffi ::c_int ;
42+ pub const LITERAL_FLOAT: ::core ::ffi ::c_float = 3.14 f32 ;
43+ pub const LITERAL_CHAR: ::core ::ffi ::c_char = ' x' as ::core ::ffi ::c_char ;
4444pub const LITERAL_STR: [::core ::ffi ::c_char ; 6 ] =
4545 unsafe { ::core ::mem ::transmute ::< [u8 ; 6 ], [::core ::ffi ::c_char ; 6 ]> (* b " hello\0 " ) };
4646pub const LITERAL_STRUCT: S = S {
4747 i: 5 as ::core ::ffi ::c_int ,
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 ;
52- pub const NESTED_CHAR: ::core ::ffi ::c_int = LITERAL_CHAR ;
51+ pub const NESTED_FLOAT: ::core ::ffi ::c_float = LITERAL_FLOAT ;
52+ pub const NESTED_CHAR: ::core ::ffi ::c_char = LITERAL_CHAR ;
5353pub const NESTED_STR: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
5454pub const NESTED_STRUCT: S = LITERAL_STRUCT ;
55- pub const PARENS: ::core ::ffi ::c_int = NESTED_INT * (LITERAL_CHAR + true_0 );
55+ pub const PARENS: ::core ::ffi ::c_int = NESTED_INT * (LITERAL_CHAR as :: core :: ffi :: c_int + true_0 );
5656pub const PTR_ARITHMETIC: *const ::core ::ffi ::c_char = unsafe {
5757 LITERAL_STR
5858 .as_ptr()
@@ -65,8 +65,8 @@ pub const CONVERSION_CAST: ::core::ffi::c_double = LITERAL_INT as ::core::ffi::c
6565pub unsafe extern " C" fn local_muts () {
6666 let mut literal_int: ::core ::ffi ::c_int = LITERAL_INT ;
6767 let mut literal_bool: bool = LITERAL_BOOL != 0 ;
68- let mut literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT as :: core :: ffi :: c_float ;
69- let mut literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as :: core :: ffi :: c_char ;
68+ let mut literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT ;
69+ let mut literal_char: ::core ::ffi ::c_char = LITERAL_CHAR ;
7070 let mut literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
7171 let mut literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
7272 let mut literal_array: [::core ::ffi ::c_int ; 3 ] = [
@@ -77,8 +77,8 @@ pub unsafe extern "C" fn local_muts() {
7777 let mut literal_struct: S = LITERAL_STRUCT ;
7878 let mut nested_int: ::core ::ffi ::c_int = NESTED_INT ;
7979 let mut nested_bool: bool = NESTED_BOOL != 0 ;
80- let mut nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as :: core :: ffi :: c_float ;
81- let mut nested_char: ::core ::ffi ::c_char = NESTED_CHAR as :: core :: ffi :: c_char ;
80+ let mut nested_float: ::core ::ffi ::c_float = NESTED_FLOAT ;
81+ let mut nested_char: ::core ::ffi ::c_char = NESTED_CHAR ;
8282 let mut nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
8383 let mut nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
8484 let mut nested_array: [::core ::ffi ::c_int ; 3 ] = [
@@ -90,7 +90,8 @@ pub unsafe extern "C" fn local_muts() {
9090 let mut negative_int: ::core ::ffi ::c_int = - LITERAL_INT ;
9191 let mut int_arithmetic: ::core ::ffi ::c_int = NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
9292 let mut mixed_arithmetic: ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
93- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
93+ + NESTED_FLOAT as ::core ::ffi ::c_double
94+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
9495 - true_0 as ::core ::ffi ::c_double )
9596 as ::core ::ffi ::c_float ;
9697 let mut parens: ::core ::ffi ::c_int = PARENS ;
@@ -99,7 +100,7 @@ pub unsafe extern "C" fn local_muts() {
99100 let mut narrowing_cast: ::core ::ffi ::c_char = LITERAL_INT as ::core ::ffi ::c_char ;
100101 let mut conversion_cast: ::core ::ffi ::c_double = CONVERSION_CAST ;
101102 let mut indexing: ::core ::ffi ::c_char =
102- 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 ];
103104 let mut str_concatenation_ptr: *const ::core ::ffi ::c_char =
104105 b " hello hello world\0 " .as_ptr () as *const ::core ::ffi ::c_char ;
105106 let mut str_concatenation: [::core ::ffi ::c_char ; 18 ] =
@@ -108,7 +109,7 @@ pub unsafe extern "C" fn local_muts() {
108109 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
109110 let mut ref_indexing: *const ::core ::ffi ::c_char = NESTED_STR
110111 .as_ptr ()
111- .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 )
112113 as *const ::core ::ffi ::c_char ;
113114 let mut ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
114115 let mut ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
@@ -121,9 +122,10 @@ pub unsafe extern "C" fn local_muts() {
121122 let mut builtin_0: ::core ::ffi ::c_int =
122123 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
123124 let mut indexing_0 : ::core ::ffi ::c_char =
124- 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 ];
125126 let mut mixed : ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
126- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
127+ + NESTED_FLOAT as ::core ::ffi ::c_double
128+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
127129 - true_0 as ::core ::ffi ::c_double )
128130 as ::core ::ffi ::c_float ;
129131 let mut i : ::core ::ffi ::c_int = 0 as ::core ::ffi ::c_int ;
@@ -138,8 +140,8 @@ pub unsafe extern "C" fn local_muts() {
138140pub unsafe extern " C" fn local_consts () {
139141 let literal_int: ::core ::ffi ::c_int = LITERAL_INT ;
140142 let literal_bool: bool = LITERAL_BOOL != 0 ;
141- let literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT as :: core :: ffi :: c_float ;
142- let literal_char: ::core ::ffi ::c_char = LITERAL_CHAR as :: core :: ffi :: c_char ;
143+ let literal_float: ::core ::ffi ::c_float = LITERAL_FLOAT ;
144+ let literal_char: ::core ::ffi ::c_char = LITERAL_CHAR ;
143145 let literal_str_ptr: *const ::core ::ffi ::c_char = LITERAL_STR .as_ptr ();
144146 let literal_str: [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
145147 let literal_array: [::core ::ffi ::c_int ; 3 ] = [
@@ -150,8 +152,8 @@ pub unsafe extern "C" fn local_consts() {
150152 let literal_struct: S = LITERAL_STRUCT ;
151153 let nested_int: ::core ::ffi ::c_int = NESTED_INT ;
152154 let nested_bool: bool = NESTED_BOOL != 0 ;
153- let nested_float: ::core ::ffi ::c_float = NESTED_FLOAT as :: core :: ffi :: c_float ;
154- let nested_char: ::core ::ffi ::c_char = NESTED_CHAR as :: core :: ffi :: c_char ;
155+ let nested_float: ::core ::ffi ::c_float = NESTED_FLOAT ;
156+ let nested_char: ::core ::ffi ::c_char = NESTED_CHAR ;
155157 let nested_str_ptr: *const ::core ::ffi ::c_char = NESTED_STR .as_ptr ();
156158 let nested_str: [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
157159 let nested_array: [::core ::ffi ::c_int ; 3 ] = [
@@ -163,23 +165,25 @@ pub unsafe extern "C" fn local_consts() {
163165 let negative_int: ::core ::ffi ::c_int = - LITERAL_INT ;
164166 let int_arithmetic: ::core ::ffi ::c_int = NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
165167 let mixed_arithmetic: ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
166- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
168+ + NESTED_FLOAT as ::core ::ffi ::c_double
169+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
167170 - true_0 as ::core ::ffi ::c_double )
168171 as ::core ::ffi ::c_float ;
169172 let parens: ::core ::ffi ::c_int = PARENS ;
170173 let ptr_arithmetic: *const ::core ::ffi ::c_char = PTR_ARITHMETIC ;
171174 let widening_cast: ::core ::ffi ::c_ulonglong = WIDENING_CAST ;
172175 let narrowing_cast: ::core ::ffi ::c_char = LITERAL_INT as ::core ::ffi ::c_char ;
173176 let conversion_cast: ::core ::ffi ::c_double = CONVERSION_CAST ;
174- let indexing: ::core ::ffi ::c_char = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
177+ let indexing: ::core ::ffi ::c_char =
178+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as ::core ::ffi ::c_int as usize ];
175179 let str_concatenation_ptr: *const ::core ::ffi ::c_char =
176180 b " hello hello world\0 " .as_ptr () as *const ::core ::ffi ::c_char ;
177181 let str_concatenation: [::core ::ffi ::c_char ; 18 ] =
178182 ::core ::mem ::transmute ::< [u8 ; 18 ], [::core ::ffi ::c_char ; 18 ]> (* b " hello hello world\0 " );
179183 let builtin: ::core ::ffi ::c_int = (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
180184 let ref_indexing: *const ::core ::ffi ::c_char = NESTED_STR
181185 .as_ptr ()
182- .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 )
183187 as *const ::core ::ffi ::c_char ;
184188 let ref_struct: *const S = & mut LITERAL_STRUCT as *mut S ;
185189 let ternary: ::core ::ffi ::c_int = if LITERAL_BOOL != 0 {
@@ -192,9 +196,10 @@ pub unsafe extern "C" fn local_consts() {
192196 let mut builtin_0: ::core ::ffi ::c_int =
193197 (LITERAL_INT as ::core ::ffi ::c_uint ).leading_zeros () as i32 ;
194198 let mut indexing_0 : ::core ::ffi ::c_char =
195- 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 ];
196200 let mut mixed : ::core ::ffi ::c_float = (LITERAL_INT as ::core ::ffi ::c_double
197- + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
201+ + NESTED_FLOAT as ::core ::ffi ::c_double
202+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
198203 - true_0 as ::core ::ffi ::c_double )
199204 as ::core ::ffi ::c_float ;
200205 let mut i : ::core ::ffi ::c_int = 0 as ::core ::ffi ::c_int ;
@@ -207,10 +212,8 @@ pub unsafe extern "C" fn local_consts() {
207212}
208213static mut global_static_const_literal_int : ::core ::ffi ::c_int = LITERAL_INT ;
209214static mut global_static_const_literal_bool : bool = LITERAL_BOOL != 0 ;
210- static mut global_static_const_literal_float : ::core ::ffi ::c_float =
211- LITERAL_FLOAT as ::core ::ffi ::c_float ;
212- static mut global_static_const_literal_char : ::core ::ffi ::c_char =
213- LITERAL_CHAR as ::core ::ffi ::c_char ;
215+ static mut global_static_const_literal_float : ::core ::ffi ::c_float = LITERAL_FLOAT ;
216+ static mut global_static_const_literal_char : ::core ::ffi ::c_char = LITERAL_CHAR ;
214217static mut global_static_const_literal_str_ptr : * const ::core: :ffi ::c_char = LITERAL_STR .as_ptr ();
215218static mut global_static_const_literal_str : [::core ::ffi ::c_char ; 6 ] = LITERAL_STR ;
216219static mut global_static_const_literal_array : [::core ::ffi ::c_int ; 3 ] = [
@@ -221,10 +224,8 @@ static mut global_static_const_literal_array: [::core::ffi::c_int; 3] = [
221224static mut global_static_const_literal_struct : S = LITERAL_STRUCT ;
222225static mut global_static_const_nested_int : ::core ::ffi ::c_int = NESTED_INT ;
223226static mut global_static_const_nested_bool : bool = NESTED_BOOL != 0 ;
224- static mut global_static_const_nested_float : ::core ::ffi ::c_float =
225- NESTED_FLOAT as ::core ::ffi ::c_float ;
226- static mut global_static_const_nested_char : ::core ::ffi ::c_char =
227- NESTED_CHAR as ::core ::ffi ::c_char ;
227+ static mut global_static_const_nested_float : ::core ::ffi ::c_float = NESTED_FLOAT ;
228+ static mut global_static_const_nested_char : ::core ::ffi ::c_char = NESTED_CHAR ;
228229static mut global_static_const_nested_str_ptr : * const ::core: :ffi ::c_char = NESTED_STR .as_ptr ();
229230static mut global_static_const_nested_str : [::core ::ffi ::c_char ; 6 ] = NESTED_STR ;
230231static mut global_static_const_nested_array : [::core ::ffi ::c_int ; 3 ] = [
@@ -237,7 +238,9 @@ static mut global_static_const_negative_int: ::core::ffi::c_int = -LITERAL_INT;
237238static mut global_static_const_int_arithmetic : ::core ::ffi ::c_int =
238239 NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
239240static mut global_static_const_mixed_arithmetic : ::core ::ffi ::c_float =
240- (LITERAL_INT as ::core ::ffi ::c_double + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
241+ (LITERAL_INT as ::core ::ffi ::c_double
242+ + NESTED_FLOAT as ::core ::ffi ::c_double
243+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
241244 - true_0 as ::core ::ffi ::c_double ) as ::core ::ffi ::c_float ;
242245static mut global_static_const_parens : ::core ::ffi ::c_int = PARENS ;
243246static mut global_static_const_ptr_arithmetic : * const ::core: :ffi ::c_char =
@@ -266,10 +269,9 @@ pub static mut global_const_literal_int: ::core::ffi::c_int = LITERAL_INT;
266269#[no_mangle ]
267270pub static mut global_const_literal_bool : bool = LITERAL_BOOL != 0 ;
268271#[no_mangle ]
269- pub static mut global_const_literal_float : ::core ::ffi ::c_float =
270- LITERAL_FLOAT as ::core ::ffi ::c_float ;
272+ pub static mut global_const_literal_float : ::core ::ffi ::c_float = LITERAL_FLOAT ;
271273#[no_mangle ]
272- pub static mut global_const_literal_char : ::core ::ffi ::c_char = LITERAL_CHAR as :: core :: ffi :: c_char ;
274+ pub static mut global_const_literal_char : ::core ::ffi ::c_char = LITERAL_CHAR ;
273275#[no_mangle ]
274276pub static mut global_const_literal_str_ptr : * const ::core: :ffi ::c_char = LITERAL_STR .as_ptr ();
275277#[no_mangle ]
@@ -287,10 +289,9 @@ pub static mut global_const_nested_int: ::core::ffi::c_int = NESTED_INT;
287289#[no_mangle ]
288290pub static mut global_const_nested_bool : bool = NESTED_BOOL != 0 ;
289291#[no_mangle ]
290- pub static mut global_const_nested_float : ::core ::ffi ::c_float =
291- NESTED_FLOAT as ::core ::ffi ::c_float ;
292+ pub static mut global_const_nested_float : ::core ::ffi ::c_float = NESTED_FLOAT ;
292293#[no_mangle ]
293- pub static mut global_const_nested_char : ::core ::ffi ::c_char = NESTED_CHAR as :: core :: ffi :: c_char ;
294+ pub static mut global_const_nested_char : ::core ::ffi ::c_char = NESTED_CHAR ;
294295#[no_mangle ]
295296pub static mut global_const_nested_str_ptr : * const ::core: :ffi ::c_char = NESTED_STR .as_ptr ();
296297#[no_mangle ]
@@ -310,7 +311,9 @@ pub static mut global_const_int_arithmetic: ::core::ffi::c_int =
310311 NESTED_INT + LITERAL_INT + 1 as ::core ::ffi ::c_int ;
311312#[no_mangle ]
312313pub static mut global_const_mixed_arithmetic : ::core ::ffi ::c_float =
313- (LITERAL_INT as ::core ::ffi ::c_double + NESTED_FLOAT * LITERAL_CHAR as ::core ::ffi ::c_double
314+ (LITERAL_INT as ::core ::ffi ::c_double
315+ + NESTED_FLOAT as ::core ::ffi ::c_double
316+ * LITERAL_CHAR as ::core ::ffi ::c_int as ::core ::ffi ::c_double
314317 - true_0 as ::core ::ffi ::c_double ) as ::core ::ffi ::c_float ;
315318#[no_mangle ]
316319pub static mut global_const_parens : ::core ::ffi ::c_int = PARENS ;
@@ -426,7 +429,7 @@ pub unsafe extern "C" fn use_local_value() -> ::core::ffi::c_int {
426429}
427430#[no_mangle]
428431pub unsafe extern "C" fn use_portable_type(mut len: uintptr_t) -> bool {
429- return len <= ( UINTPTR_MAX as uintptr_t ) .wrapping_div (2 as ::core ::ffi ::c_int as uintptr_t );
432+ return len <= UINTPTR_MAX .wrapping_div (2 as ::core ::ffi ::c_int as uintptr_t );
430433}
431434#[no_mangle]
432435pub unsafe extern "C" fn ntlm_v2_blob_len(mut ntlm: *mut ntlmdata) -> ::core::ffi::c_uint {
@@ -444,10 +447,11 @@ pub unsafe extern "C" fn late_init_var() -> ::core::ffi::c_int {
444447}
445448unsafe extern "C" fn c2rust_run_static_initializers() {
446449 global_static_const_ptr_arithmetic = PTR_ARITHMETIC ;
447- global_static_const_indexing = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
450+ global_static_const_indexing =
451+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as ::core ::ffi ::c_int as usize ];
448452 global_static_const_ref_indexing = NESTED_STR
449453 .as_ptr ()
450- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
454+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
451455 as *const ::core ::ffi ::c_char ;
452456 global_static_const_ternary = if LITERAL_BOOL != 0 {
453457 1 as ::core ::ffi ::c_int
@@ -456,10 +460,11 @@ unsafe extern "C" fn c2rust_run_static_initializers() {
456460 };
457461 global_static_const_member = LITERAL_STRUCT .i ;
458462 global_const_ptr_arithmetic = PTR_ARITHMETIC ;
459- global_const_indexing = NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_int as usize ];
463+ global_const_indexing =
464+ NESTED_STR [LITERAL_FLOAT as ::core ::ffi ::c_double as ::core ::ffi ::c_int as usize ];
460465 global_const_ref_indexing = NESTED_STR
461466 .as_ptr ()
462- .offset (LITERAL_FLOAT as ::core ::ffi ::c_int as isize )
467+ .offset (LITERAL_FLOAT as ::core ::ffi ::c_double as :: core :: ffi :: c_int as isize )
463468 as *const ::core ::ffi ::c_char ;
464469 global_const_ternary = if LITERAL_BOOL != 0 {
465470 1 as ::core ::ffi ::c_int
0 commit comments