File tree 3 files changed +35
-1
lines changed
3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,7 @@ impl CodeGenerator for Type {
666
666
. through_type_refs ( )
667
667
. resolve ( ctx) ;
668
668
let name = item. canonical_name ( ctx) ;
669
+ let path = item. canonical_path ( ctx) ;
669
670
670
671
{
671
672
let through_type_aliases = inner. into_resolver ( )
@@ -678,7 +679,7 @@ impl CodeGenerator for Type {
678
679
// typedef struct foo { ... } foo;
679
680
//
680
681
// here, and also other more complex cases like #946.
681
- if through_type_aliases. canonical_name ( ctx) == name {
682
+ if through_type_aliases. canonical_path ( ctx) == path {
682
683
return ;
683
684
}
684
685
}
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+ #![ allow(
4
+ dead_code,
5
+ non_snake_case,
6
+ non_camel_case_types,
7
+ non_upper_case_globals
8
+ ) ]
9
+
10
+ #[ allow( non_snake_case, non_camel_case_types, non_upper_case_globals) ]
11
+ pub mod root {
12
+ #[ allow( unused_imports) ]
13
+ use self :: super :: root;
14
+ pub mod ns {
15
+ #[ allow( unused_imports) ]
16
+ use self :: super :: super :: root;
17
+ pub const AB_A : root:: ns:: AB = 0 ;
18
+ pub const AB_B : root:: ns:: AB = 1 ;
19
+ pub type AB = i32 ;
20
+ }
21
+ pub use self :: super :: root:: ns:: AB ;
22
+ extern "C" {
23
+ #[ link_name = "\u{1} _ZL2kA" ]
24
+ pub static kA: root:: AB ;
25
+ }
26
+ }
Original file line number Diff line number Diff line change
1
+ // bindgen-flags: --enable-cxx-namespaces
2
+
3
+ namespace ns {
4
+ enum class AB { A, B };
5
+ }
6
+ using AB = ns::AB;
7
+ static const AB kA = AB::A;
You can’t perform that action at this time.
0 commit comments