@@ -33,38 +33,38 @@ fn bindgen_test_layout_foo() {
33
33
) ;
34
34
assert_eq ! (
35
35
{
36
- let struct_instance = unsafe { std :: mem:: zeroed:: <foo>( ) } ;
36
+ let struct_instance = unsafe { core :: mem:: zeroed:: <foo>( ) } ;
37
37
let struct_ptr = & struct_instance as * const foo;
38
- let field_ptr = std :: ptr:: addr_of!( struct_instance. a) ;
38
+ let field_ptr = core :: ptr:: addr_of!( struct_instance. a) ;
39
39
let struct_address = struct_ptr as usize ;
40
40
let field_address = field_ptr as usize ;
41
- std :: mem:: forget( struct_instance) ;
41
+ core :: mem:: forget( struct_instance) ;
42
42
field_address. checked_sub( struct_address) . unwrap( )
43
43
} ,
44
44
0usize ,
45
45
concat!( "Offset of field: " , stringify!( foo) , "::" , stringify!( a) )
46
46
) ;
47
47
assert_eq ! (
48
48
{
49
- let struct_instance = unsafe { std :: mem:: zeroed:: <foo>( ) } ;
49
+ let struct_instance = unsafe { core :: mem:: zeroed:: <foo>( ) } ;
50
50
let struct_ptr = & struct_instance as * const foo;
51
- let field_ptr = std :: ptr:: addr_of!( struct_instance. b) ;
51
+ let field_ptr = core :: ptr:: addr_of!( struct_instance. b) ;
52
52
let struct_address = struct_ptr as usize ;
53
53
let field_address = field_ptr as usize ;
54
- std :: mem:: forget( struct_instance) ;
54
+ core :: mem:: forget( struct_instance) ;
55
55
field_address. checked_sub( struct_address) . unwrap( )
56
56
} ,
57
57
4usize ,
58
58
concat!( "Offset of field: " , stringify!( foo) , "::" , stringify!( b) )
59
59
) ;
60
60
assert_eq ! (
61
61
{
62
- let struct_instance = unsafe { std :: mem:: zeroed:: <foo>( ) } ;
62
+ let struct_instance = unsafe { core :: mem:: zeroed:: <foo>( ) } ;
63
63
let struct_ptr = & struct_instance as * const foo;
64
- let field_ptr = std :: ptr:: addr_of!( struct_instance. bar) ;
64
+ let field_ptr = core :: ptr:: addr_of!( struct_instance. bar) ;
65
65
let struct_address = struct_ptr as usize ;
66
66
let field_address = field_ptr as usize ;
67
- std :: mem:: forget( struct_instance) ;
67
+ core :: mem:: forget( struct_instance) ;
68
68
field_address. checked_sub( struct_address) . unwrap( )
69
69
} ,
70
70
8usize ,
0 commit comments