summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/annotation_hide.rs1
-rw-r--r--tests/expectations/class.rs1
-rw-r--r--tests/expectations/class_nested.rs1
-rw-r--r--tests/expectations/class_no_members.rs1
-rw-r--r--tests/expectations/class_static.rs1
-rw-r--r--tests/expectations/class_use_as.rs1
-rw-r--r--tests/expectations/class_with_dtor.rs1
-rw-r--r--tests/expectations/class_with_inner_struct.rs1
-rw-r--r--tests/expectations/class_with_typedef.rs1
-rw-r--r--tests/expectations/decl_ptr_to_array.rs1
-rw-r--r--tests/expectations/duplicated_constants_in_ns.rs1
-rw-r--r--tests/expectations/enum.rs1
-rw-r--r--tests/expectations/enum_and_vtable_mangling.rs1
-rw-r--r--tests/expectations/enum_dupe.rs1
-rw-r--r--tests/expectations/enum_explicit_type.rs1
-rw-r--r--tests/expectations/enum_negative.rs1
-rw-r--r--tests/expectations/enum_packed.rs1
-rw-r--r--tests/expectations/extern.rs1
-rw-r--r--tests/expectations/forward_declared_struct.rs1
-rw-r--r--tests/expectations/func_proto.rs1
-rw-r--r--tests/expectations/func_ptr.rs1
-rw-r--r--tests/expectations/func_ptr_in_struct.rs1
-rw-r--r--tests/expectations/func_with_array_arg.rs1
-rw-r--r--tests/expectations/func_with_func_ptr_arg.rs1
-rw-r--r--tests/expectations/inner_template_self.rs1
-rw-r--r--tests/expectations/jsval_layout_opaque.rs4
-rw-r--r--tests/expectations/mutable.rs1
-rw-r--r--tests/expectations/namespace.rs1
-rw-r--r--tests/expectations/nested.rs1
-rw-r--r--tests/expectations/no_copy.rs1
-rw-r--r--tests/expectations/nsStyleAutoArray.rs1
-rw-r--r--tests/expectations/only_bitfields.rs4
-rw-r--r--tests/expectations/opaque_in_struct.rs1
-rw-r--r--tests/expectations/opaque_pointer.rs1
-rw-r--r--tests/expectations/opaque_typedef.rs1
-rw-r--r--tests/expectations/overflowed_enum.rs1
-rw-r--r--tests/expectations/size_t_template.rs1
-rw-r--r--tests/expectations/struct_containing_forward_declared_struct.rs1
-rw-r--r--tests/expectations/struct_with_anon_struct.rs1
-rw-r--r--tests/expectations/struct_with_anon_struct_array.rs1
-rw-r--r--tests/expectations/struct_with_anon_struct_pointer.rs1
-rw-r--r--tests/expectations/struct_with_anon_union.rs1
-rw-r--r--tests/expectations/struct_with_anon_unnamed_struct.rs1
-rw-r--r--tests/expectations/struct_with_anon_unnamed_union.rs1
-rw-r--r--tests/expectations/struct_with_bitfields.rs13
-rw-r--r--tests/expectations/struct_with_derive_debug.rs1
-rw-r--r--tests/expectations/struct_with_nesting.rs1
-rw-r--r--tests/expectations/struct_with_packing.rs1
-rw-r--r--tests/expectations/struct_with_struct.rs1
-rw-r--r--tests/expectations/template.rs1
-rw-r--r--tests/expectations/union_fields.rs1
-rw-r--r--tests/expectations/union_with_anon_struct.rs1
-rw-r--r--tests/expectations/union_with_anon_struct_bitfield.rs4
-rw-r--r--tests/expectations/union_with_anon_union.rs1
-rw-r--r--tests/expectations/union_with_anon_unnamed_struct.rs1
-rw-r--r--tests/expectations/union_with_anon_unnamed_union.rs1
-rw-r--r--tests/expectations/union_with_big_member.rs1
-rw-r--r--tests/expectations/union_with_nesting.rs1
-rw-r--r--tests/expectations/using.rs1
-rw-r--r--tests/expectations/weird_bitfields.rs14
-rw-r--r--tests/headers/jsval_layout_opaque.hpp2
-rw-r--r--tests/headers/only_bitfields.hpp2
-rw-r--r--tests/headers/struct_with_bitfields.h1
-rw-r--r--tests/headers/union_with_anon_struct_bitfield.h3
-rw-r--r--tests/headers/weird_bitfields.hpp1
-rwxr-xr-xtests/tools/run-bindgen.py1
66 files changed, 26 insertions, 78 deletions
diff --git a/tests/expectations/annotation_hide.rs b/tests/expectations/annotation_hide.rs
index 9d4d1ee8..14ba8310 100644
--- a/tests/expectations/annotation_hide.rs
+++ b/tests/expectations/annotation_hide.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class.rs b/tests/expectations/class.rs
index 560c315c..450a57a6 100644
--- a/tests/expectations/class.rs
+++ b/tests/expectations/class.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_nested.rs b/tests/expectations/class_nested.rs
index 0cec8d2e..22e72209 100644
--- a/tests/expectations/class_nested.rs
+++ b/tests/expectations/class_nested.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_no_members.rs b/tests/expectations/class_no_members.rs
index 77902d62..8468c02b 100644
--- a/tests/expectations/class_no_members.rs
+++ b/tests/expectations/class_no_members.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_static.rs b/tests/expectations/class_static.rs
index f97875e9..8aa156d8 100644
--- a/tests/expectations/class_static.rs
+++ b/tests/expectations/class_static.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_use_as.rs b/tests/expectations/class_use_as.rs
index eb150c3d..4d06feca 100644
--- a/tests/expectations/class_use_as.rs
+++ b/tests/expectations/class_use_as.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_with_dtor.rs b/tests/expectations/class_with_dtor.rs
index 983b41df..3cc48dfb 100644
--- a/tests/expectations/class_with_dtor.rs
+++ b/tests/expectations/class_with_dtor.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_with_inner_struct.rs b/tests/expectations/class_with_inner_struct.rs
index d045e911..b465a183 100644
--- a/tests/expectations/class_with_inner_struct.rs
+++ b/tests/expectations/class_with_inner_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/class_with_typedef.rs b/tests/expectations/class_with_typedef.rs
index 328ef2a0..44bce6d7 100644
--- a/tests/expectations/class_with_typedef.rs
+++ b/tests/expectations/class_with_typedef.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/decl_ptr_to_array.rs b/tests/expectations/decl_ptr_to_array.rs
index 74054fdd..e7dabeee 100644
--- a/tests/expectations/decl_ptr_to_array.rs
+++ b/tests/expectations/decl_ptr_to_array.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/duplicated_constants_in_ns.rs b/tests/expectations/duplicated_constants_in_ns.rs
index 3f7fefe6..b4b7b2bc 100644
--- a/tests/expectations/duplicated_constants_in_ns.rs
+++ b/tests/expectations/duplicated_constants_in_ns.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum.rs b/tests/expectations/enum.rs
index 23a599b9..f6f510dd 100644
--- a/tests/expectations/enum.rs
+++ b/tests/expectations/enum.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum_and_vtable_mangling.rs b/tests/expectations/enum_and_vtable_mangling.rs
index f6b1385a..c68dc102 100644
--- a/tests/expectations/enum_and_vtable_mangling.rs
+++ b/tests/expectations/enum_and_vtable_mangling.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum_dupe.rs b/tests/expectations/enum_dupe.rs
index 28d7b63d..10464881 100644
--- a/tests/expectations/enum_dupe.rs
+++ b/tests/expectations/enum_dupe.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum_explicit_type.rs b/tests/expectations/enum_explicit_type.rs
index cfc1f41d..1b94c284 100644
--- a/tests/expectations/enum_explicit_type.rs
+++ b/tests/expectations/enum_explicit_type.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum_negative.rs b/tests/expectations/enum_negative.rs
index 0a7a36f7..03db5709 100644
--- a/tests/expectations/enum_negative.rs
+++ b/tests/expectations/enum_negative.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/enum_packed.rs b/tests/expectations/enum_packed.rs
index 6b3f1b57..7684a26d 100644
--- a/tests/expectations/enum_packed.rs
+++ b/tests/expectations/enum_packed.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/extern.rs b/tests/expectations/extern.rs
index eda55446..8f122341 100644
--- a/tests/expectations/extern.rs
+++ b/tests/expectations/extern.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/forward_declared_struct.rs b/tests/expectations/forward_declared_struct.rs
index 48333da3..3a812c0d 100644
--- a/tests/expectations/forward_declared_struct.rs
+++ b/tests/expectations/forward_declared_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/func_proto.rs b/tests/expectations/func_proto.rs
index eda55446..8f122341 100644
--- a/tests/expectations/func_proto.rs
+++ b/tests/expectations/func_proto.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/func_ptr.rs b/tests/expectations/func_ptr.rs
index 4a94aebb..01e413a6 100644
--- a/tests/expectations/func_ptr.rs
+++ b/tests/expectations/func_ptr.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/func_ptr_in_struct.rs b/tests/expectations/func_ptr_in_struct.rs
index c177116d..3d7b5f68 100644
--- a/tests/expectations/func_ptr_in_struct.rs
+++ b/tests/expectations/func_ptr_in_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/func_with_array_arg.rs b/tests/expectations/func_with_array_arg.rs
index 4df689ae..1528e0ba 100644
--- a/tests/expectations/func_with_array_arg.rs
+++ b/tests/expectations/func_with_array_arg.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/func_with_func_ptr_arg.rs b/tests/expectations/func_with_func_ptr_arg.rs
index 1dc98c81..4ac25286 100644
--- a/tests/expectations/func_with_func_ptr_arg.rs
+++ b/tests/expectations/func_with_func_ptr_arg.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/inner_template_self.rs b/tests/expectations/inner_template_self.rs
index ec8bf6b1..60af23ee 100644
--- a/tests/expectations/inner_template_self.rs
+++ b/tests/expectations/inner_template_self.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/jsval_layout_opaque.rs b/tests/expectations/jsval_layout_opaque.rs
index 760ac1f2..fa9b89b9 100644
--- a/tests/expectations/jsval_layout_opaque.rs
+++ b/tests/expectations/jsval_layout_opaque.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
@@ -167,7 +166,8 @@ impl jsval_layout_jsval_layout_opaque_hpp_unnamed_1 {
self._bitfield_1 |=
((val as u64) << 47usize) & (18446603336221196288usize as u64);
}
- pub const fn new_bitfield_1(payload47: u32, tag: u32) -> u64 {
+ #[inline]
+ pub fn new_bitfield_1(payload47: u32, tag: u32) -> u64 {
0 | ((payload47 as u64) << 0u32) | ((tag as u64) << 47u32)
}
}
diff --git a/tests/expectations/mutable.rs b/tests/expectations/mutable.rs
index 62b4c524..cf2c5937 100644
--- a/tests/expectations/mutable.rs
+++ b/tests/expectations/mutable.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/namespace.rs b/tests/expectations/namespace.rs
index 4d9225f3..36113536 100644
--- a/tests/expectations/namespace.rs
+++ b/tests/expectations/namespace.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/nested.rs b/tests/expectations/nested.rs
index dd61ecdf..2f7fae9a 100644
--- a/tests/expectations/nested.rs
+++ b/tests/expectations/nested.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/no_copy.rs b/tests/expectations/no_copy.rs
index 95a733b6..601b65c8 100644
--- a/tests/expectations/no_copy.rs
+++ b/tests/expectations/no_copy.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/nsStyleAutoArray.rs b/tests/expectations/nsStyleAutoArray.rs
index 28207639..8acfa150 100644
--- a/tests/expectations/nsStyleAutoArray.rs
+++ b/tests/expectations/nsStyleAutoArray.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/only_bitfields.rs b/tests/expectations/only_bitfields.rs
index 88345373..d46a1f83 100644
--- a/tests/expectations/only_bitfields.rs
+++ b/tests/expectations/only_bitfields.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
@@ -25,7 +24,8 @@ impl Struct_C {
self._bitfield_1 &= !(254usize as u8);
self._bitfield_1 |= ((val as u8) << 1usize) & (254usize as u8);
}
- pub const fn new_bitfield_1(a: bool, b: u8) -> u8 {
+ #[inline]
+ pub fn new_bitfield_1(a: bool, b: u8) -> u8 {
0 | ((a as u8) << 0u32) | ((b as u8) << 1u32)
}
}
diff --git a/tests/expectations/opaque_in_struct.rs b/tests/expectations/opaque_in_struct.rs
index 24860e2c..a5e3dff6 100644
--- a/tests/expectations/opaque_in_struct.rs
+++ b/tests/expectations/opaque_in_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/opaque_pointer.rs b/tests/expectations/opaque_pointer.rs
index 7d6961b5..eb5f09cd 100644
--- a/tests/expectations/opaque_pointer.rs
+++ b/tests/expectations/opaque_pointer.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/opaque_typedef.rs b/tests/expectations/opaque_typedef.rs
index 7dfa0ff9..a54ac881 100644
--- a/tests/expectations/opaque_typedef.rs
+++ b/tests/expectations/opaque_typedef.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/overflowed_enum.rs b/tests/expectations/overflowed_enum.rs
index 7b6de96b..2228e44b 100644
--- a/tests/expectations/overflowed_enum.rs
+++ b/tests/expectations/overflowed_enum.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/size_t_template.rs b/tests/expectations/size_t_template.rs
index c4f1b0e5..6f249ae5 100644
--- a/tests/expectations/size_t_template.rs
+++ b/tests/expectations/size_t_template.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_containing_forward_declared_struct.rs b/tests/expectations/struct_containing_forward_declared_struct.rs
index 8de4c419..11ca55b8 100644
--- a/tests/expectations/struct_containing_forward_declared_struct.rs
+++ b/tests/expectations/struct_containing_forward_declared_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_struct.rs b/tests/expectations/struct_with_anon_struct.rs
index dd6e480a..52495279 100644
--- a/tests/expectations/struct_with_anon_struct.rs
+++ b/tests/expectations/struct_with_anon_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_struct_array.rs b/tests/expectations/struct_with_anon_struct_array.rs
index f0b9290f..19a16cd6 100644
--- a/tests/expectations/struct_with_anon_struct_array.rs
+++ b/tests/expectations/struct_with_anon_struct_array.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_struct_pointer.rs b/tests/expectations/struct_with_anon_struct_pointer.rs
index 97d58aea..84aa0f15 100644
--- a/tests/expectations/struct_with_anon_struct_pointer.rs
+++ b/tests/expectations/struct_with_anon_struct_pointer.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_union.rs b/tests/expectations/struct_with_anon_union.rs
index 668b1273..04883f78 100644
--- a/tests/expectations/struct_with_anon_union.rs
+++ b/tests/expectations/struct_with_anon_union.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_unnamed_struct.rs b/tests/expectations/struct_with_anon_unnamed_struct.rs
index 7318db9a..6f7afeae 100644
--- a/tests/expectations/struct_with_anon_unnamed_struct.rs
+++ b/tests/expectations/struct_with_anon_unnamed_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_anon_unnamed_union.rs b/tests/expectations/struct_with_anon_unnamed_union.rs
index 5df5f61b..73bd0111 100644
--- a/tests/expectations/struct_with_anon_unnamed_union.rs
+++ b/tests/expectations/struct_with_anon_unnamed_union.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_bitfields.rs b/tests/expectations/struct_with_bitfields.rs
index 26003ebd..c2bfc543 100644
--- a/tests/expectations/struct_with_bitfields.rs
+++ b/tests/expectations/struct_with_bitfields.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
@@ -80,9 +79,9 @@ impl Struct_bitfield {
((val as ::std::os::raw::c_ushort) << 6usize) &
(192usize as ::std::os::raw::c_ushort);
}
- pub const fn new_bitfield_1(a: bool, b: bool, c: bool,
- unnamed_bitfield1: bool,
- unnamed_bitfield2: u8, d: u8)
+ #[inline]
+ pub fn new_bitfield_1(a: bool, b: bool, c: bool, unnamed_bitfield1: bool,
+ unnamed_bitfield2: u8, d: u8)
-> ::std::os::raw::c_ushort {
0 | ((a as ::std::os::raw::c_ushort) << 0u32) |
((b as ::std::os::raw::c_ushort) << 1u32) |
@@ -102,7 +101,8 @@ impl Struct_bitfield {
((val as ::std::os::raw::c_uint) << 0usize) &
(3usize as ::std::os::raw::c_uint);
}
- pub const fn new_bitfield_2(f: u8) -> ::std::os::raw::c_uint {
+ #[inline]
+ pub fn new_bitfield_2(f: u8) -> ::std::os::raw::c_uint {
0 | ((f as ::std::os::raw::c_uint) << 0u32)
}
#[inline]
@@ -117,7 +117,8 @@ impl Struct_bitfield {
((val as ::std::os::raw::c_uint) << 0usize) &
(4294967295usize as ::std::os::raw::c_uint);
}
- pub const fn new_bitfield_3(g: u32) -> ::std::os::raw::c_uint {
+ #[inline]
+ pub fn new_bitfield_3(g: u32) -> ::std::os::raw::c_uint {
0 | ((g as ::std::os::raw::c_uint) << 0u32)
}
}
diff --git a/tests/expectations/struct_with_derive_debug.rs b/tests/expectations/struct_with_derive_debug.rs
index bc006717..f89d9d72 100644
--- a/tests/expectations/struct_with_derive_debug.rs
+++ b/tests/expectations/struct_with_derive_debug.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_nesting.rs b/tests/expectations/struct_with_nesting.rs
index 787a174d..2de481ea 100644
--- a/tests/expectations/struct_with_nesting.rs
+++ b/tests/expectations/struct_with_nesting.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_packing.rs b/tests/expectations/struct_with_packing.rs
index a6aa9780..9f997435 100644
--- a/tests/expectations/struct_with_packing.rs
+++ b/tests/expectations/struct_with_packing.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/struct_with_struct.rs b/tests/expectations/struct_with_struct.rs
index 234cd6f5..0c6ab122 100644
--- a/tests/expectations/struct_with_struct.rs
+++ b/tests/expectations/struct_with_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/template.rs b/tests/expectations/template.rs
index 02e683a8..2f3f9a21 100644
--- a/tests/expectations/template.rs
+++ b/tests/expectations/template.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_fields.rs b/tests/expectations/union_fields.rs
index 974a8f71..1a957eaa 100644
--- a/tests/expectations/union_fields.rs
+++ b/tests/expectations/union_fields.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_anon_struct.rs b/tests/expectations/union_with_anon_struct.rs
index 3f78fb85..850f39bc 100644
--- a/tests/expectations/union_with_anon_struct.rs
+++ b/tests/expectations/union_with_anon_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_anon_struct_bitfield.rs b/tests/expectations/union_with_anon_struct_bitfield.rs
index 26b428f5..ce59836e 100644
--- a/tests/expectations/union_with_anon_struct_bitfield.rs
+++ b/tests/expectations/union_with_anon_struct_bitfield.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
@@ -79,7 +78,8 @@ impl Struct_foo_union_with_anon_struct_bitfield_h_unnamed_1 {
((val as ::std::os::raw::c_int) << 7usize) &
(4294967168usize as ::std::os::raw::c_int);
}
- pub const fn new_bitfield_1(b: u8, c: u32) -> ::std::os::raw::c_int {
+ #[inline]
+ pub fn new_bitfield_1(b: u8, c: u32) -> ::std::os::raw::c_int {
0 | ((b as ::std::os::raw::c_int) << 0u32) |
((c as ::std::os::raw::c_int) << 7u32)
}
diff --git a/tests/expectations/union_with_anon_union.rs b/tests/expectations/union_with_anon_union.rs
index 9ea9b841..f610342d 100644
--- a/tests/expectations/union_with_anon_union.rs
+++ b/tests/expectations/union_with_anon_union.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_anon_unnamed_struct.rs b/tests/expectations/union_with_anon_unnamed_struct.rs
index 80e28512..cdc760c4 100644
--- a/tests/expectations/union_with_anon_unnamed_struct.rs
+++ b/tests/expectations/union_with_anon_unnamed_struct.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_anon_unnamed_union.rs b/tests/expectations/union_with_anon_unnamed_union.rs
index a502f1f3..50dfc8d0 100644
--- a/tests/expectations/union_with_anon_unnamed_union.rs
+++ b/tests/expectations/union_with_anon_unnamed_union.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_big_member.rs b/tests/expectations/union_with_big_member.rs
index 122d5a64..d1cd63d4 100644
--- a/tests/expectations/union_with_big_member.rs
+++ b/tests/expectations/union_with_big_member.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/union_with_nesting.rs b/tests/expectations/union_with_nesting.rs
index 070cc045..4117786d 100644
--- a/tests/expectations/union_with_nesting.rs
+++ b/tests/expectations/union_with_nesting.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/using.rs b/tests/expectations/using.rs
index 705c4bd5..adc1e61b 100644
--- a/tests/expectations/using.rs
+++ b/tests/expectations/using.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
diff --git a/tests/expectations/weird_bitfields.rs b/tests/expectations/weird_bitfields.rs
index d2ae1f96..6166a60f 100644
--- a/tests/expectations/weird_bitfields.rs
+++ b/tests/expectations/weird_bitfields.rs
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */
-#![feature(const_fn)]
#![allow(non_snake_case)]
@@ -54,7 +53,8 @@ impl Struct_Weird {
((val as ::std::os::raw::c_uint) << 16usize) &
(2147418112usize as ::std::os::raw::c_uint);
}
- pub const fn new_bitfield_1(bitTest: u16, bitTest2: u16)
+ #[inline]
+ pub fn new_bitfield_1(bitTest: u16, bitTest2: u16)
-> ::std::os::raw::c_uint {
0 | ((bitTest as ::std::os::raw::c_uint) << 0u32) |
((bitTest2 as ::std::os::raw::c_uint) << 16u32)
@@ -104,11 +104,11 @@ impl Struct_Weird {
self._bitfield_2 &= !(256usize as u32);
self._bitfield_2 |= ((val as u32) << 8usize) & (256usize as u32);
}
- pub const fn new_bitfield_2(mFillOpacitySource: u8,
- mStrokeOpacitySource: u8,
- mStrokeDasharrayFromObject: bool,
- mStrokeDashoffsetFromObject: bool,
- mStrokeWidthFromObject: bool) -> u32 {
+ #[inline]
+ pub fn new_bitfield_2(mFillOpacitySource: u8, mStrokeOpacitySource: u8,
+ mStrokeDasharrayFromObject: bool,
+ mStrokeDashoffsetFromObject: bool,
+ mStrokeWidthFromObject: bool) -> u32 {
0 | ((mFillOpacitySource as u32) << 0u32) |
((mStrokeOpacitySource as u32) << 3u32) |
((mStrokeDasharrayFromObject as u32) << 6u32) |
diff --git a/tests/headers/jsval_layout_opaque.hpp b/tests/headers/jsval_layout_opaque.hpp
index 630a2c17..db09cb54 100644
--- a/tests/headers/jsval_layout_opaque.hpp
+++ b/tests/headers/jsval_layout_opaque.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: -std=c++11 -match jsval_layout_opaque.hpp -no-type-renaming
+// bindgen-flags: -std=c++11 -match jsval_layout_opaque.hpp -no-type-renaming -no-unstable-rust
#include <stdint.h>
#include <stddef.h>
diff --git a/tests/headers/only_bitfields.hpp b/tests/headers/only_bitfields.hpp
index 48b401b6..30a75ebb 100644
--- a/tests/headers/only_bitfields.hpp
+++ b/tests/headers/only_bitfields.hpp
@@ -1,4 +1,4 @@
-
+// bindgen-flags: -no-unstable-rust
class C {
bool a: 1;
bool b: 7;
diff --git a/tests/headers/struct_with_bitfields.h b/tests/headers/struct_with_bitfields.h
index ece512cd..b994da4e 100644
--- a/tests/headers/struct_with_bitfields.h
+++ b/tests/headers/struct_with_bitfields.h
@@ -1,3 +1,4 @@
+// bindgen-flags: -no-unstable-rust
struct bitfield {
unsigned short
a :1,
diff --git a/tests/headers/union_with_anon_struct_bitfield.h b/tests/headers/union_with_anon_struct_bitfield.h
index d39b92d1..5a6fc7bc 100644
--- a/tests/headers/union_with_anon_struct_bitfield.h
+++ b/tests/headers/union_with_anon_struct_bitfield.h
@@ -1,7 +1,8 @@
+// bindgen-flags: -no-unstable-rust
union foo {
int a;
struct {
int b : 7;
int c : 25;
};
-}; \ No newline at end of file
+};
diff --git a/tests/headers/weird_bitfields.hpp b/tests/headers/weird_bitfields.hpp
index 68cbf4a5..e8287507 100644
--- a/tests/headers/weird_bitfields.hpp
+++ b/tests/headers/weird_bitfields.hpp
@@ -1,3 +1,4 @@
+// bindgen-flags: -no-unstable-rust
// You can guess where this is taken from...
enum nsStyleSVGOpacitySource {
eStyleSVGOpacitySource_Normal,
diff --git a/tests/tools/run-bindgen.py b/tests/tools/run-bindgen.py
index 5fde6739..50e96d95 100755
--- a/tests/tools/run-bindgen.py
+++ b/tests/tools/run-bindgen.py
@@ -7,7 +7,6 @@ import tempfile
BINDGEN_FLAGS_PREFIX = "// bindgen-flags: ";
COMMON_PRELUDE = """
-#![feature(const_fn)]
#![allow(non_snake_case)]
"""