Skip to content

Commit cbbe118

Browse files
committed
Use fully disambiguated name instead of a number for layout tests (fixes #394)
1 parent 6053d99 commit cbbe118

30 files changed

+66
-39
lines changed

src/codegen/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ impl CodeGenerator for TemplateInstantiation {
768768
let size = layout.size;
769769
let align = layout.align;
770770

771-
let name = item.canonical_name(ctx);
771+
let name = item.full_disambiguated_name(ctx);
772772
let mut fn_name = format!("__bindgen_test_layout_{}_instantiation", name);
773773
let times_seen = result.overload_number(&fn_name);
774774
if times_seen > 0 {

src/ir/item.rs

+27
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,33 @@ impl Item {
681681
}
682682
}
683683

684+
/// Create a fully disambiguated name for an item, including template
685+
/// parameters if it is a type
686+
pub fn full_disambiguated_name(&self, ctx: &BindgenContext) -> String {
687+
let mut s = String::new();
688+
let level = 0;
689+
self.push_disambiguated_name(ctx, &mut s, level);
690+
s
691+
}
692+
693+
/// Helper function for full_disambiguated_name
694+
fn push_disambiguated_name(&self, ctx: &BindgenContext, to: &mut String, level: u8) {
695+
to.push_str(&self.canonical_name(ctx));
696+
if let ItemKind::Type(ref ty) = *self.kind() {
697+
if let TypeKind::TemplateInstantiation(ref inst) = *ty.kind() {
698+
to.push_str(&format!("_open{}_", level));
699+
for arg in inst.template_arguments() {
700+
arg.into_resolver()
701+
.through_type_refs()
702+
.resolve(ctx)
703+
.push_disambiguated_name(ctx, to, level + 1);
704+
to.push_str("_");
705+
}
706+
to.push_str(&format!("close{}", level));
707+
}
708+
}
709+
}
710+
684711
/// Get this function item's name, or `None` if this item is not a function.
685712
fn func_name(&self) -> Option<&str> {
686713
match *self.kind() {

tests/expectations/tests/anon_union.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl Default for ErrorResult {
8080
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
8181
}
8282
#[test]
83-
fn __bindgen_test_layout_TErrorResult_instantiation() {
83+
fn __bindgen_test_layout_TErrorResult_open0_int_close0_instantiation() {
8484
assert_eq!(::std::mem::size_of::<TErrorResult>() , 24usize , concat ! (
8585
"Size of template specialization: " , stringify ! (
8686
TErrorResult ) ));

tests/expectations/tests/class_nested.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extern "C" {
7878
pub static mut var: A_B;
7979
}
8080
#[test]
81-
fn __bindgen_test_layout_A_D_instantiation() {
81+
fn __bindgen_test_layout_A_D_open0_int_close0_instantiation() {
8282
assert_eq!(::std::mem::size_of::<A_D<::std::os::raw::c_int>>() , 4usize ,
8383
concat ! (
8484
"Size of template specialization: " , stringify ! (

tests/expectations/tests/class_with_dtor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Default for WithoutDtor {
3535
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3636
}
3737
#[test]
38-
fn __bindgen_test_layout_HandleWithDtor_instantiation() {
38+
fn __bindgen_test_layout_HandleWithDtor_open0_int_close0_instantiation() {
3939
assert_eq!(::std::mem::size_of::<HandleWithDtor<::std::os::raw::c_int>>()
4040
, 8usize , concat ! (
4141
"Size of template specialization: " , stringify ! (

tests/expectations/tests/crtp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ impl Default for DerivedFromBaseWithDestructor {
5151
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
5252
}
5353
#[test]
54-
fn __bindgen_test_layout_Base_instantiation() {
54+
fn __bindgen_test_layout_Base_open0_Derived_close0_instantiation() {
5555
assert_eq!(::std::mem::size_of::<Base>() , 1usize , concat ! (
5656
"Size of template specialization: " , stringify ! ( Base ) ));
5757
assert_eq!(::std::mem::align_of::<Base>() , 1usize , concat ! (
5858
"Alignment of template specialization: " , stringify ! ( Base )
5959
));
6060
}
6161
#[test]
62-
fn __bindgen_test_layout_BaseWithDestructor_instantiation() {
62+
fn __bindgen_test_layout_BaseWithDestructor_open0_DerivedFromBaseWithDestructor_close0_instantiation() {
6363
assert_eq!(::std::mem::size_of::<BaseWithDestructor>() , 1usize , concat !
6464
(
6565
"Size of template specialization: " , stringify ! (

tests/expectations/tests/default-template-parameter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl <T, U> Default for Foo<T, U> {
1616
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
1717
}
1818
#[test]
19-
fn __bindgen_test_layout_Foo_instantiation() {
19+
fn __bindgen_test_layout_Foo_open0_bool__int_close0_instantiation() {
2020
assert_eq!(::std::mem::size_of::<Foo<bool, ::std::os::raw::c_int>>() ,
2121
8usize , concat ! (
2222
"Size of template specialization: " , stringify ! (

tests/expectations/tests/forward-declaration-autoptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl Default for Bar {
4242
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
4343
}
4444
#[test]
45-
fn __bindgen_test_layout_RefPtr_instantiation() {
45+
fn __bindgen_test_layout_RefPtr_open0_Foo_close0_instantiation() {
4646
assert_eq!(::std::mem::size_of::<RefPtr<Foo>>() , 8usize , concat ! (
4747
"Size of template specialization: " , stringify ! ( RefPtr<Foo>
4848
) ));

tests/expectations/tests/inner_template_self.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Default for InstantiateIt {
3737
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3838
}
3939
#[test]
40-
fn __bindgen_test_layout_LinkedList_instantiation() {
40+
fn __bindgen_test_layout_LinkedList_open0_int_close0_instantiation() {
4141
assert_eq!(::std::mem::size_of::<LinkedList>() , 16usize , concat ! (
4242
"Size of template specialization: " , stringify ! ( LinkedList
4343
) ));

tests/expectations/tests/issue-372.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub mod root {
102102
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
103103
}
104104
#[test]
105-
fn __bindgen_test_layout_C_instantiation() {
105+
fn __bindgen_test_layout_C_open0_n_close0_instantiation() {
106106
assert_eq!(::std::mem::size_of::<[u64; 33usize]>() , 264usize , concat
107107
! (
108108
"Size of template specialization: " , stringify ! (

tests/expectations/tests/issue-569-non-type-template-params-causing-layout-test-failures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Default for JS_AutoIdVector {
3232
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3333
}
3434
#[test]
35-
fn __bindgen_test_layout_JS_Base_instantiation() {
35+
fn __bindgen_test_layout_JS_Base_open0_int_close0_instantiation() {
3636
assert_eq!(::std::mem::size_of::<JS_Base>() , 1usize , concat ! (
3737
"Size of template specialization: " , stringify ! ( JS_Base )
3838
));

tests/expectations/tests/issue-573-layout-test-failures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Default for AutoIdVector {
2929
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3030
}
3131
#[test]
32-
fn __bindgen_test_layout_Outer_instantiation() {
32+
fn __bindgen_test_layout_Outer_open0_int_close0_instantiation() {
3333
assert_eq!(::std::mem::size_of::<Outer>() , 1usize , concat ! (
3434
"Size of template specialization: " , stringify ! ( Outer ) ));
3535
assert_eq!(::std::mem::align_of::<Outer>() , 1usize , concat ! (

tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
pub static mut AutoIdVector: _bindgen_ty_1;
3838
}
3939
#[test]
40-
fn __bindgen_test_layout_a_instantiation() {
40+
fn __bindgen_test_layout_a_open0_int_close0_instantiation() {
4141
assert_eq!(::std::mem::size_of::<a>() , 1usize , concat ! (
4242
"Size of template specialization: " , stringify ! ( a ) ));
4343
assert_eq!(::std::mem::align_of::<a>() , 1usize , concat ! (

tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ extern "C" {
8080
pub fn Servo_Element_GetSnapshot() -> A;
8181
}
8282
#[test]
83-
fn __bindgen_test_layout_f_instantiation() {
83+
fn __bindgen_test_layout_f_open0_e_open1_int_close1_close0_instantiation() {
8484
assert_eq!(::std::mem::size_of::<f>() , 1usize , concat ! (
8585
"Size of template specialization: " , stringify ! ( f ) ));
8686
assert_eq!(::std::mem::align_of::<f>() , 1usize , concat ! (

tests/expectations/tests/issue-674-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub mod root {
6767
pub _address: u8,
6868
}
6969
#[test]
70-
fn __bindgen_test_layout_StaticRefPtr_instantiation() {
70+
fn __bindgen_test_layout_StaticRefPtr_open0_B_close0_instantiation() {
7171
assert_eq!(::std::mem::size_of::<root::StaticRefPtr>() , 1usize ,
7272
concat ! (
7373
"Size of template specialization: " , stringify ! (

tests/expectations/tests/issue-691-template-parameter-virtual.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Default for ServoElementSnapshotTable {
5151
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
5252
}
5353
#[test]
54-
fn __bindgen_test_layout_Set_instantiation() {
54+
fn __bindgen_test_layout_Set_open0_VirtualMethods_close0_instantiation() {
5555
assert_eq!(::std::mem::size_of::<Set>() , 4usize , concat ! (
5656
"Size of template specialization: " , stringify ! ( Set ) ));
5757
assert_eq!(::std::mem::align_of::<Set>() , 4usize , concat ! (

tests/expectations/tests/libclang-3.8/issue-769-bad-instantiation-test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mod root {
1818
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
1919
}
2020
#[test]
21-
fn __bindgen_test_layout_Rooted_instantiation() {
21+
fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation() {
2222
assert_eq!(::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>()
2323
, 4usize , concat ! (
2424
"Size of template specialization: " , stringify ! (
@@ -29,7 +29,7 @@ pub mod root {
2929
root::Rooted<::std::os::raw::c_int> ) ));
3030
}
3131
#[test]
32-
fn __bindgen_test_layout_Rooted_instantiation_1() {
32+
fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation_1() {
3333
assert_eq!(::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>()
3434
, 4usize , concat ! (
3535
"Size of template specialization: " , stringify ! (

tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Usage {
4646
}
4747
}
4848
#[test]
49-
fn __bindgen_test_layout__bindgen_ty_id_21_instantiation() {
49+
fn __bindgen_test_layout__bindgen_ty_id_21_open0__bindgen_ty_id_19_close0_instantiation() {
5050
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! (
5151
"Size of template specialization: " , stringify ! (
5252
[u32; 2usize] ) ));

tests/expectations/tests/libclang-3.9/issue-769-bad-instantiation-test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mod root {
1818
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
1919
}
2020
#[test]
21-
fn __bindgen_test_layout_Rooted_instantiation() {
21+
fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation() {
2222
assert_eq!(::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>()
2323
, 4usize , concat ! (
2424
"Size of template specialization: " , stringify ! (
@@ -29,7 +29,7 @@ pub mod root {
2929
root::Rooted<::std::os::raw::c_int> ) ));
3030
}
3131
#[test]
32-
fn __bindgen_test_layout_Rooted_instantiation_1() {
32+
fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation_1() {
3333
assert_eq!(::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>()
3434
, 4usize , concat ! (
3535
"Size of template specialization: " , stringify ! (

tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl Clone for Usage {
3434
fn clone(&self) -> Self { *self }
3535
}
3636
#[test]
37-
fn __bindgen_test_layout__bindgen_ty_id_20_instantiation() {
37+
fn __bindgen_test_layout__bindgen_ty_id_20_open0__bindgen_ty_id_18_close0_instantiation() {
3838
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! (
3939
"Size of template specialization: " , stringify ! (
4040
[u32; 2usize] ) ));

tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl Clone for Usage {
3434
fn clone(&self) -> Self { *self }
3535
}
3636
#[test]
37-
fn __bindgen_test_layout__bindgen_ty_id_20_instantiation() {
37+
fn __bindgen_test_layout__bindgen_ty_id_20_open0__bindgen_ty_id_18_close0_instantiation() {
3838
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! (
3939
"Size of template specialization: " , stringify ! (
4040
[u32; 2usize] ) ));

tests/expectations/tests/libclang-4/type_alias_template_specialized.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Default for Rooted {
3030
/// <div rustbindgen replaces="MaybeWrapped"></div>
3131
pub type MaybeWrapped<a> = a;
3232
#[test]
33-
fn __bindgen_test_layout_MaybeWrapped_instantiation() {
33+
fn __bindgen_test_layout_MaybeWrapped_open0_int_close0_instantiation()() {
3434
assert_eq!(::std::mem::size_of::<MaybeWrapped<::std::os::raw::c_int>>() ,
3535
4usize , concat ! (
3636
"Size of template specialization: " , stringify ! (

tests/expectations/tests/non-type-params.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl Default for UsesArray {
3838
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3939
}
4040
#[test]
41-
fn __bindgen_test_layout_Array_instantiation() {
41+
fn __bindgen_test_layout_Array_open0_int_close0_instantiation() {
4242
assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! (
4343
"Size of template specialization: " , stringify ! (
4444
[u32; 4usize] ) ));
@@ -47,7 +47,7 @@ fn __bindgen_test_layout_Array_instantiation() {
4747
[u32; 4usize] ) ));
4848
}
4949
#[test]
50-
fn __bindgen_test_layout_Array_instantiation_1() {
50+
fn __bindgen_test_layout_Array_open0_char_close0_instantiation() {
5151
assert_eq!(::std::mem::size_of::<[u8; 16usize]>() , 16usize , concat ! (
5252
"Size of template specialization: " , stringify ! (
5353
[u8; 16usize] ) ));
@@ -56,7 +56,7 @@ fn __bindgen_test_layout_Array_instantiation_1() {
5656
[u8; 16usize] ) ));
5757
}
5858
#[test]
59-
fn __bindgen_test_layout_Array_instantiation_2() {
59+
fn __bindgen_test_layout_Array_open0_bool__close0_instantiation() {
6060
assert_eq!(::std::mem::size_of::<[u8; 8usize]>() , 8usize , concat ! (
6161
"Size of template specialization: " , stringify ! (
6262
[u8; 8usize] ) ));

tests/expectations/tests/opaque-template-instantiation-namespaced.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub mod root {
115115
}
116116
}
117117
#[test]
118-
fn __bindgen_test_layout_Template_instantiation() {
118+
fn __bindgen_test_layout_Template_open0_Foo_close0_instantiation() {
119119
assert_eq!(::std::mem::size_of::<root::zoidberg::Template<root::zoidberg::Foo>>()
120120
, 1usize , concat ! (
121121
"Size of template specialization: " , stringify ! (

tests/expectations/tests/opaque-template-instantiation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Clone for ContainsOpaqueInstantiation {
6363
fn clone(&self) -> Self { *self }
6464
}
6565
#[test]
66-
fn __bindgen_test_layout_Template_instantiation() {
66+
fn __bindgen_test_layout_Template_open0_char_close0_instantiation() {
6767
assert_eq!(::std::mem::size_of::<Template<::std::os::raw::c_char>>() ,
6868
1usize , concat ! (
6969
"Size of template specialization: " , stringify ! (

tests/expectations/tests/opaque_pointer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Default for WithOpaquePtr {
6464
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
6565
}
6666
#[test]
67-
fn __bindgen_test_layout_Opaque_instantiation() {
67+
fn __bindgen_test_layout_Opaque_open0_float_close0_instantiation() {
6868
assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! (
6969
"Size of template specialization: " , stringify ! ( u32 ) ));
7070
assert_eq!(::std::mem::align_of::<u32>() , 4usize , concat ! (

tests/expectations/tests/replace_use.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl Default for Test {
3434
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
3535
}
3636
#[test]
37-
fn __bindgen_test_layout_nsTArray_instantiation() {
37+
fn __bindgen_test_layout_nsTArray_open0_long_close0_instantiation() {
3838
assert_eq!(::std::mem::size_of::<nsTArray>() , 4usize , concat ! (
3939
"Size of template specialization: " , stringify ! ( nsTArray )
4040
));

tests/expectations/tests/size_t_template.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Default for C {
2424
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
2525
}
2626
#[test]
27-
fn __bindgen_test_layout_Array_instantiation() {
27+
fn __bindgen_test_layout_Array_open0_int_close0_instantiation() {
2828
assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! (
2929
"Size of template specialization: " , stringify ! (
3030
[u32; 3usize] ) ));

tests/expectations/tests/template.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl <T> Default for ReplacedWithoutDestructorFwd<T> {
234234
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
235235
}
236236
#[test]
237-
fn __bindgen_test_layout_Foo_instantiation() {
237+
fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation() {
238238
assert_eq!(::std::mem::size_of::<Foo<::std::os::raw::c_int>>() , 24usize ,
239239
concat ! (
240240
"Size of template specialization: " , stringify ! (
@@ -245,7 +245,7 @@ fn __bindgen_test_layout_Foo_instantiation() {
245245
Foo<::std::os::raw::c_int> ) ));
246246
}
247247
#[test]
248-
fn __bindgen_test_layout_Foo_instantiation_1() {
248+
fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation_1() {
249249
assert_eq!(::std::mem::size_of::<Foo<::std::os::raw::c_int>>() , 24usize ,
250250
concat ! (
251251
"Size of template specialization: " , stringify ! (
@@ -256,7 +256,7 @@ fn __bindgen_test_layout_Foo_instantiation_1() {
256256
Foo<::std::os::raw::c_int> ) ));
257257
}
258258
#[test]
259-
fn __bindgen_test_layout_Rooted_instantiation() {
259+
fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_108_close0_instantiation() {
260260
assert_eq!(::std::mem::size_of::<Rooted<*mut ::std::os::raw::c_void>>() ,
261261
24usize , concat ! (
262262
"Size of template specialization: " , stringify ! (
@@ -267,7 +267,7 @@ fn __bindgen_test_layout_Rooted_instantiation() {
267267
Rooted<*mut ::std::os::raw::c_void> ) ));
268268
}
269269
#[test]
270-
fn __bindgen_test_layout_Rooted_instantiation_1() {
270+
fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_114_close0_instantiation() {
271271
assert_eq!(::std::mem::size_of::<Rooted<*mut ::std::os::raw::c_void>>() ,
272272
24usize , concat ! (
273273
"Size of template specialization: " , stringify ! (
@@ -278,7 +278,7 @@ fn __bindgen_test_layout_Rooted_instantiation_1() {
278278
Rooted<*mut ::std::os::raw::c_void> ) ));
279279
}
280280
#[test]
281-
fn __bindgen_test_layout_WithDtor_instantiation() {
281+
fn __bindgen_test_layout_WithDtor_open0_int_close0_instantiation() {
282282
assert_eq!(::std::mem::size_of::<WithDtor<::std::os::raw::c_int>>() ,
283283
4usize , concat ! (
284284
"Size of template specialization: " , stringify ! (
@@ -289,7 +289,7 @@ fn __bindgen_test_layout_WithDtor_instantiation() {
289289
WithDtor<::std::os::raw::c_int> ) ));
290290
}
291291
#[test]
292-
fn __bindgen_test_layout_Opaque_instantiation() {
292+
fn __bindgen_test_layout_Opaque_open0_int_close0_instantiation() {
293293
assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! (
294294
"Size of template specialization: " , stringify ! ( u32 ) ));
295295
assert_eq!(::std::mem::align_of::<u32>() , 4usize , concat ! (

tests/expectations/tests/typeref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Default for Bar {
124124
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
125125
}
126126
#[test]
127-
fn __bindgen_test_layout_mozilla_StyleShapeSource_instantiation() {
127+
fn __bindgen_test_layout_mozilla_StyleShapeSource_open0_int_close0_instantiation() {
128128
assert_eq!(::std::mem::size_of::<mozilla_StyleShapeSource>() , 8usize ,
129129
concat ! (
130130
"Size of template specialization: " , stringify ! (

0 commit comments

Comments
 (0)