summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/codegen/mod.rs2
-rw-r--r--tests/expectations/tests/bitfield_method_mangling.rs2
-rw-r--r--tests/expectations/tests/inherit_typedef.rs2
-rw-r--r--tests/expectations/tests/reparented_replacement.rs2
-rw-r--r--tests/expectations/tests/union_fields.rs2
-rw-r--r--tests/expectations/tests/unknown_attr.rs2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 45a7b1b7..fa34d341 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -543,7 +543,7 @@ impl CodeGenerator for Type {
let simple_enum_path = match inner_rust_type.node {
ast::TyKind::Path(None, ref p) => {
if applicable_template_args.is_empty() &&
- !inner_item.expect_type().canonical_type(ctx).is_builtin_or_named() &&
+ inner_item.expect_type().canonical_type(ctx).is_enum() &&
p.segments.iter().all(|p| p.parameters.is_none()) {
Some(p.clone())
} else {
diff --git a/tests/expectations/tests/bitfield_method_mangling.rs b/tests/expectations/tests/bitfield_method_mangling.rs
index b650a38f..5aba8abb 100644
--- a/tests/expectations/tests/bitfield_method_mangling.rs
+++ b/tests/expectations/tests/bitfield_method_mangling.rs
@@ -46,4 +46,4 @@ impl _bindgen_ty_1 {
((val as u32 as u32) << 24u32) & (4278190080usize as u32);
}
}
-pub use self::_bindgen_ty_1 as mach_msg_type_descriptor_t;
+pub type mach_msg_type_descriptor_t = _bindgen_ty_1;
diff --git a/tests/expectations/tests/inherit_typedef.rs b/tests/expectations/tests/inherit_typedef.rs
index 2b974223..ca9041e2 100644
--- a/tests/expectations/tests/inherit_typedef.rs
+++ b/tests/expectations/tests/inherit_typedef.rs
@@ -17,7 +17,7 @@ fn bindgen_test_layout_Foo() {
impl Clone for Foo {
fn clone(&self) -> Self { *self }
}
-pub use self::Foo as TypedefedFoo;
+pub type TypedefedFoo = Foo;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Bar {
diff --git a/tests/expectations/tests/reparented_replacement.rs b/tests/expectations/tests/reparented_replacement.rs
index 684c75ed..74ee229c 100644
--- a/tests/expectations/tests/reparented_replacement.rs
+++ b/tests/expectations/tests/reparented_replacement.rs
@@ -25,5 +25,5 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
}
- pub use self::super::root::foo::Bar as ReferencesBar;
+ pub type ReferencesBar = root::foo::Bar;
}
diff --git a/tests/expectations/tests/union_fields.rs b/tests/expectations/tests/union_fields.rs
index 21d87919..495e80f9 100644
--- a/tests/expectations/tests/union_fields.rs
+++ b/tests/expectations/tests/union_fields.rs
@@ -44,4 +44,4 @@ fn bindgen_test_layout__bindgen_ty_1() {
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
-pub use self::_bindgen_ty_1 as nsStyleUnion;
+pub type nsStyleUnion = _bindgen_ty_1;
diff --git a/tests/expectations/tests/unknown_attr.rs b/tests/expectations/tests/unknown_attr.rs
index 541bee5d..fd9cce45 100644
--- a/tests/expectations/tests/unknown_attr.rs
+++ b/tests/expectations/tests/unknown_attr.rs
@@ -13,4 +13,4 @@ pub struct _bindgen_ty_1 {
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
-pub use self::_bindgen_ty_1 as max_align_t;
+pub type max_align_t = _bindgen_ty_1;