Closed
Description
Input C/C++ Header
struct Foo {
void test();
};
Bindgen Invocation
$ bindgen input.hpp --ignore-methods -- --target=i686-pc-win32
Actual Results
thread 'main' panicked at 'Invalid or unknown abi 4 for function "_bindgen_ty_id_2" FunctionSig { return_type: ItemId(6), argument_types: [(Some("this"), ItemId(4))], is_variadic: false, abi: Unknown(4) }', /Users/upsuper/.cargo-target/debug/build/bindgen-96ad8d9060ae5f67/out/codegen.rs:5987
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::panicking::default_hook::{{closure}}
2: std::panicking::default_hook
3: std::panicking::rust_panic_with_hook
4: std::panicking::begin_panic
5: std::panicking::begin_panic_fmt
6: <bindgen::ir::function::FunctionSig as bindgen::codegen::TryToRustTy>::try_to_rust_ty
7: bindgen::codegen::utils::rust_fndecl_from_signature
8: <bindgen::ir::function::Function as bindgen::codegen::CodeGenerator>::codegen
9: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
10: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}
11: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen
12: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
13: bindgen::codegen::codegen::{{closure}}
14: bindgen::ir::context::BindgenContext::gen
15: bindgen::codegen::codegen
16: bindgen::Bindings::generate
17: bindgen::Builder::generate
18: bindgen::main::{{closure}}
19: std::panicking::try::do_call
20: __rust_maybe_catch_panic
21: std::panicking::try
22: std::panic::catch_unwind
23: bindgen::main
24: __rust_maybe_catch_panic
25: std::rt::lang_start
26: main
Expected Results
This panics when the target is win32 because we don't support thiscall
, while for other platforms, it doesn't panic, but it still generates a binding function for the method.
RUST_LOG=bindgen
Output
INFO:bindgen: Clang Version: clang version 4.0.0 (tags/RELEASE_400/final)
WARN:bindgen: Using clang (4, 0), expected (3, 9)
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {} }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: None, loc: None
DEBUG:bindgen::ir::item: Item::from_ty_with_id: ItemId(1)
ty = Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))),
location = Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), Some(Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), Some(Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::ty: from_clang_ty: ItemId(1), ty: Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), loc: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))
DEBUG:bindgen::ir::ty: currently_parsed_types: [PartialType { decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), id: ItemId(1) }]
DEBUG:bindgen::ir::comp: CompInfo::from_ty(Struct, Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")))
DEBUG:bindgen::ir::function: Function::parse(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#")), Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)))
DEBUG:bindgen::ir::item: Item::from_ty_with_id: ItemId(2)
ty = Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)),
location = Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::ty: from_clang_ty: ItemId(2), ty: Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), loc: Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))
DEBUG:bindgen::ir::ty: currently_parsed_types: [PartialType { decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), id: ItemId(1) }]
DEBUG:bindgen::ir::function: FunctionSig::from_ty Type(void () __attribute__((thiscall)), kind: FunctionProto, cconv: 4, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)) Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))
DEBUG:bindgen::ir::item: Item::from_ty_with_id: ItemId(3)
ty = Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))),
location = Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), Some(Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::item: Avoiding recursion parsing type: Type(Foo, kind: Record, cconv: 100, decl: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")), canon: Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")))
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(4), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: None, kind: Pointer(ItemId(1)), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: None, loc: None
DEBUG:bindgen::ir::context: add_item_to_module: adding ItemId(4) as child of parent module ItemId(0)
DEBUG:bindgen::ir::item: from_ty_or_ref_with_id: ItemId(5) Type(void, kind: Void, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#")), None
DEBUG:bindgen::ir::context: builtin_or_resolved_ty: Type(void, kind: Void, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))), None
DEBUG:bindgen::ir::context: Not resolved, maybe builtin?
DEBUG:bindgen::ir::context: add_builtin_item: item = Item { id: ItemId(6), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("void"), layout: None, kind: Void, is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::ir::context: add_item_to_module: adding ItemId(6) as child of parent module ItemId(0)
DEBUG:bindgen::ir::item: ItemId(6) already resolved: Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))
WARN:bindgen::ir::function: Unknown calling convention: 4
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(2), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: Some(Layout { size: 1, align: 4, packed: false }), kind: Function(FunctionSig { return_type: ItemId(6), argument_types: [(Some("this"), ItemId(4))], is_variadic: false, abi: Unknown(4) }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: Some(Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), loc: Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#")))
DEBUG:bindgen::ir::context: add_item_to_module: adding ItemId(2) as child of parent module ItemId(0)
DEBUG:bindgen::ir::context: Invalid declaration Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None) found for type Type { name: None, layout: Some(Layout { size: 1, align: 4, packed: false }), kind: Function(FunctionSig { return_type: ItemId(6), argument_types: [(Some("this"), ItemId(4))], is_variadic: false, abi: Unknown(4) }), is_const: false }
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(7), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(1), kind: Function(Function { name: "test", mangled_name: Some("\u{1}?test@Foo@@QAEXXZ"), signature: ItemId(2), comment: None }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#"))), loc: Some(Cursor(test kind: CXXMethod, loc: test.hpp:2:8, usr: Some("c:@S@Foo@F@test#")))
DEBUG:bindgen::ir::context: add_item_to_module: adding ItemId(7) as child of current module ItemId(0)
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(1), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("Foo"), layout: Some(Layout { size: 1, align: 1, packed: false }), kind: Comp(CompInfo { kind: Struct, fields: BeforeComputingBitfieldUnits([]), template_params: [], methods: [Method { kind: Normal, signature: ItemId(7), is_const: false }], constructors: [], destructor: None, base_members: [], inner_types: [], inner_vars: [], has_vtable: false, has_destructor: false, has_nonempty_base: false, has_non_type_template_params: false, packed: false, found_unknown_attr: false, detect_derive_debug_cycle: Cell { value: false }, detect_derive_default_cycle: Cell { value: false }, detect_has_destructor_cycle: Cell { value: false }, is_forward_declaration: false }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: Some(Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo"))), loc: Some(Cursor(Foo kind: StructDecl, loc: test.hpp:1:8, usr: Some("c:@S@Foo")))
DEBUG:bindgen::ir::context: add_item_to_module: adding ItemId(1) as child of parent module ItemId(0)
DEBUG:bindgen::ir::context: No replacements to process
TRACE:bindgen::ir::named: constrain ItemId(2)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: union with ItemId(6)'s usage: []
TRACE:bindgen::ir::named: union with ItemId(4)'s usage: []
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(7)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(6)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(1)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(4)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: union with ItemId(1)'s usage: []
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(4)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: union with ItemId(1)'s usage: []
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(6)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(2)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: union with ItemId(6)'s usage: []
TRACE:bindgen::ir::named: union with ItemId(4)'s usage: []
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(7)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(1)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
TRACE:bindgen::ir::named: constrain ItemId(0)
TRACE:bindgen::ir::named: initially, used set is {}
TRACE:bindgen::ir::named: other item: join with successors' usage
TRACE:bindgen::ir::named: finally, used set is {}
DEBUG:bindgen::codegen: codegen: BindgenOptions { hidden_types: RegexSet { items: [], set: Some(RegexSet([])) }, opaque_types: RegexSet { items: [], set: Some(RegexSet([])) }, whitelisted_types: RegexSet { items: [], set: Some(RegexSet([])) }, whitelisted_functions: RegexSet { items: [], set: Some(RegexSet([])) }, whitelisted_vars: RegexSet { items: [], set: Some(RegexSet([])) }, bitfield_enums: RegexSet { items: [], set: Some(RegexSet([])) }, constified_enums: RegexSet { items: [], set: Some(RegexSet([])) }, constified_enum_modules: RegexSet { items: [], set: Some(RegexSet([])) }, builtins: false, links: [], emit_ast: false, emit_ir: false, emit_ir_graphviz: None, enable_cxx_namespaces: false, disable_name_namespacing: false, layout_tests: true, derive_debug: true, derive_default: false, unstable_rust: false, use_core: false, ctypes_prefix: None, namespaced_constants: true, msvc_mangling: false, convert_floats: true, raw_lines: [], clang_args: ["--target=i686-pc-win32", "test.hpp"], input_header: Some("test.hpp"), input_unsaved_files: [], dummy_uses: None, parse_callbacks: None, codegen_config: CodegenConfig { functions: true, types: true, vars: true, methods: false, constructors: true, destructors: true }, conservative_inline_namespaces: false, generate_comments: true, generate_inline_functions: false, whitelist_recursively: true, objc_extern_crate: false, enable_mangling: true, prepend_enum_name: true }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {ItemId(1), ItemId(2), ItemId(4), ItemId(6), ItemId(7)} }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Module as CodeGenerator>::codegen: item = Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {ItemId(1), ItemId(2), ItemId(4), ItemId(6), ItemId(7)} }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(1), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("Foo"), layout: Some(Layout { size: 1, align: 1, packed: false }), kind: Comp(CompInfo { kind: Struct, fields: AfterComputingBitfieldUnits([]), template_params: [], methods: [Method { kind: Normal, signature: ItemId(7), is_const: false }], constructors: [], destructor: None, base_members: [], inner_types: [], inner_vars: [], has_vtable: false, has_destructor: false, has_nonempty_base: false, has_non_type_template_params: false, packed: false, found_unknown_attr: false, detect_derive_debug_cycle: Cell { value: false }, detect_derive_default_cycle: Cell { value: false }, detect_has_destructor_cycle: Cell { value: false }, is_forward_declaration: false }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Type as CodeGenerator>::codegen: item = Item { id: ItemId(1), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("Foo"), layout: Some(Layout { size: 1, align: 1, packed: false }), kind: Comp(CompInfo { kind: Struct, fields: AfterComputingBitfieldUnits([]), template_params: [], methods: [Method { kind: Normal, signature: ItemId(7), is_const: false }], constructors: [], destructor: None, base_members: [], inner_types: [], inner_vars: [], has_vtable: false, has_destructor: false, has_nonempty_base: false, has_non_type_template_params: false, packed: false, found_unknown_attr: false, detect_derive_debug_cycle: Cell { value: false }, detect_derive_default_cycle: Cell { value: false }, detect_has_destructor_cycle: Cell { value: false }, is_forward_declaration: false }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <CompInfo as CodeGenerator>::codegen: item = Item { id: ItemId(1), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("Foo"), layout: Some(Layout { size: 1, align: 1, packed: false }), kind: Comp(CompInfo { kind: Struct, fields: AfterComputingBitfieldUnits([]), template_params: [], methods: [Method { kind: Normal, signature: ItemId(7), is_const: false }], constructors: [], destructor: None, base_members: [], inner_types: [], inner_vars: [], has_vtable: false, has_destructor: false, has_nonempty_base: false, has_non_type_template_params: false, packed: false, found_unknown_attr: false, detect_derive_debug_cycle: Cell { value: false }, detect_derive_default_cycle: Cell { value: false }, detect_has_destructor_cycle: Cell { value: false }, is_forward_declaration: false }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(2), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: Some(Layout { size: 1, align: 4, packed: false }), kind: Function(FunctionSig { return_type: ItemId(6), argument_types: [(Some("this"), ItemId(4))], is_variadic: false, abi: Unknown(4) }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Type as CodeGenerator>::codegen: item = Item { id: ItemId(2), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: Some(Layout { size: 1, align: 4, packed: false }), kind: Function(FunctionSig { return_type: ItemId(6), argument_types: [(Some("this"), ItemId(4))], is_variadic: false, abi: Unknown(4) }), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(4), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: None, kind: Pointer(ItemId(1)), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Type as CodeGenerator>::codegen: item = Item { id: ItemId(4), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: None, layout: None, kind: Pointer(ItemId(1)), is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(6), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("void"), layout: None, kind: Void, is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Type as CodeGenerator>::codegen: item = Item { id: ItemId(6), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Type(Type { name: Some("void"), layout: None, kind: Void, is_const: false }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Item as CodeGenerator>::codegen: self = Item { id: ItemId(7), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(1), kind: Function(Function { name: "test", mangled_name: Some("\u{1}?test@Foo@@QAEXXZ"), signature: ItemId(2), comment: None }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }
DEBUG:bindgen::codegen: <Function as CodeGenerator>::codegen: item = Item { id: ItemId(7), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(1), kind: Function(Function { name: "test", mangled_name: Some("\u{1}?test@Foo@@QAEXXZ"), signature: ItemId(2), comment: None }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }