servo: Merge #10358 - Stylo again (from emilio:stylo-again); r=bholley
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Sat, 02 Apr 2016 10:01:05 +0500
changeset 338389 2e11cc74c6bdbf9a5f207413b45ac600728943a5
parent 338388 7e706a27731852c984fd0f0a29da0f055a443754
child 338390 115ad4a8af93938feee392fba3401003a30daf37
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
servo: Merge #10358 - Stylo again (from emilio:stylo-again); r=bholley This fixes some bugs in our bindings, the most important one being that we didn't repr(C) opaque types. r? @bholley Source-Repo: https://github.com/servo/servo Source-Revision: 71428b5ddaa2d9b680c5b6678917a8c5c7bf5c90
servo/ports/geckolib/gecko_style_structs.rs
servo/ports/geckolib/tools/regen_style_structs.sh
--- a/servo/ports/geckolib/gecko_style_structs.rs
+++ b/servo/ports/geckolib/gecko_style_structs.rs
@@ -863,17 +863,17 @@ pub const NS_EXACT_LENGTH: nsresult = ns
 pub const NS_PARTIAL_MORE_INPUT: nsresult = nsresult::NS_OK_UDEC_MOREINPUT;
 pub const NS_PARTIAL_MORE_OUTPUT: nsresult = nsresult::NS_OK_UDEC_MOREOUTPUT;
 pub const NS_ERROR_ILLEGAL_INPUT: nsresult =
     nsresult::NS_ERROR_UDEC_ILLEGALINPUT;
 pub const NS_ERROR_XPATH_INVALID_ARG: nsresult =
     nsresult::NS_ERROR_ILLEGAL_VALUE;
 pub const NS_SUCCESS_RESTART_APP: nsresult = nsresult::NS_SUCCESS_DONT_FIXUP;
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsresult {
     NS_OK = 0,
     NS_ERROR_BASE = -1041039360,
     NS_ERROR_NOT_INITIALIZED = -1041039359,
     NS_ERROR_ALREADY_INITIALIZED = -1041039358,
     NS_ERROR_NOT_IMPLEMENTED = -2147467263,
     NS_NOINTERFACE = -2147467262,
     NS_ERROR_ABORT = -2147467260,
@@ -1184,16 +1184,17 @@ pub enum nsresult {
     NS_ERROR_DOM_INVALID_EXPRESSION_ERR = -2141519821,
     NS_ERROR_DOM_TYPE_ERR = -2141519820,
     NS_ERROR_WONT_HANDLE_CONTENT = -2141388799,
     NS_ERROR_MALWARE_URI = -2141388770,
     NS_ERROR_PHISHING_URI = -2141388769,
     NS_ERROR_TRACKING_URI = -2141388766,
     NS_ERROR_UNWANTED_URI = -2141388765,
     NS_ERROR_FORBIDDEN_URI = -2141388764,
+    NS_ERROR_BLOCKED_URI = -2141388763,
     NS_ERROR_SAVE_LINK_AS_TIMEOUT = -2141388768,
     NS_ERROR_PARSED_DATA_CACHED = -2141388767,
     NS_REFRESHURI_HEADER_FOUND = 6094850,
     NS_ERROR_IMAGE_SRC_CHANGED = -2141323260,
     NS_ERROR_IMAGE_BLOCKED = -2141323259,
     NS_ERROR_CONTENT_BLOCKED = -2141323258,
     NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = -2141323257,
     NS_PROPTABLE_PROP_NOT_THERE = -2141323254,
@@ -1339,62 +1340,74 @@ pub struct nsReadingIterator<CharT> {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct nsWritingIterator<CharT> {
     pub mStart: *mut CharT,
     pub mEnd: *mut CharT,
     pub mPosition: *mut CharT,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStringComparator;
+impl ::std::clone::Clone for nsStringComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsDefaultStringComparator {
     pub _base: nsStringComparator,
 }
+impl ::std::clone::Clone for nsDefaultStringComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
 pub struct nsAString_internal {
     pub mData: *mut ::std::os::raw::c_ushort,
     pub mLength: ::std::os::raw::c_uint,
     pub mFlags: u32,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsAString_internal_nsTSubstring_h_unnamed_1 {
     F_NONE = 0,
     F_TERMINATED = 1,
     F_VOIDED = 2,
     F_SHARED = 4,
     F_OWNED = 8,
     F_FIXED = 16,
     F_LITERAL = 32,
     F_CLASS_FIXED = 65536,
 }
 #[test]
 fn bindgen_test_layout_nsAString_internal() {
     assert_eq!(::std::mem::size_of::<nsAString_internal>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsAString_internal>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCStringComparator;
+impl ::std::clone::Clone for nsCStringComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsDefaultCStringComparator {
     pub _base: nsCStringComparator,
 }
+impl ::std::clone::Clone for nsDefaultCStringComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
 pub struct nsACString_internal {
     pub mData: *mut ::std::os::raw::c_char,
     pub mLength: ::std::os::raw::c_uint,
     pub mFlags: u32,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsACString_internal_nsTSubstring_h_unnamed_2 {
     F_NONE = 0,
     F_TERMINATED = 1,
     F_VOIDED = 2,
     F_SHARED = 4,
     F_OWNED = 8,
     F_FIXED = 16,
     F_LITERAL = 32,
@@ -1405,57 +1418,72 @@ fn bindgen_test_layout_nsACString_intern
     assert_eq!(::std::mem::size_of::<nsACString_internal>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsACString_internal>() , 8usize);
 }
 /**
  * ASCII case-insensitive comparator.  (for Unicode case-insensitive
  * comparision, see nsUnicharUtils.h)
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCaseInsensitiveCStringComparator {
     pub _base: nsCStringComparator,
 }
+impl ::std::clone::Clone for nsCaseInsensitiveCStringComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCaseInsensitiveCStringArrayComparator;
+impl ::std::clone::Clone for nsCaseInsensitiveCStringArrayComparator {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsSubstringTuple {
     pub mHead: *const nsSubstringTuple,
     pub mFragA: *const nsAString_internal,
     pub mFragB: *const nsAString_internal,
 }
+impl ::std::clone::Clone for nsSubstringTuple {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsSubstringTuple() {
     assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsSubstringTuple>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCSubstringTuple {
     pub mHead: *const nsCSubstringTuple,
     pub mFragA: *const nsACString_internal,
     pub mFragB: *const nsACString_internal,
 }
+impl ::std::clone::Clone for nsCSubstringTuple {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCSubstringTuple() {
     assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsCSubstringTuple>() , 8usize);
 }
 #[repr(C)]
 pub struct nsString {
     pub _base: nsAString_internal,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsString_Segment {
     pub mBegin: u32,
     pub mLength: u32,
 }
+impl ::std::clone::Clone for nsString_Segment {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsString_Segment() {
     assert_eq!(::std::mem::size_of::<nsString_Segment>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsString_Segment>() , 4usize);
 }
 #[test]
 fn bindgen_test_layout_nsString() {
     assert_eq!(::std::mem::size_of::<nsString>() , 16usize);
@@ -1473,17 +1501,17 @@ fn bindgen_test_layout_nsFixedString() {
     assert_eq!(::std::mem::align_of::<nsFixedString>() , 8usize);
 }
 #[repr(C)]
 pub struct nsAutoString {
     pub _base: nsFixedString,
     pub mStorage: [::std::os::raw::c_ushort; 64usize],
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsAutoString_nsTString_h_unnamed_3 { kDefaultStorageSize = 64, }
 #[test]
 fn bindgen_test_layout_nsAutoString() {
     assert_eq!(::std::mem::size_of::<nsAutoString>() , 160usize);
     assert_eq!(::std::mem::align_of::<nsAutoString>() , 8usize);
 }
 #[repr(C)]
 #[derive(Copy, Clone)]
@@ -1518,21 +1546,24 @@ fn bindgen_test_layout_nsAdoptingString(
     assert_eq!(::std::mem::size_of::<nsAdoptingString>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsAdoptingString>() , 8usize);
 }
 #[repr(C)]
 pub struct nsCString {
     pub _base: nsACString_internal,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCString_Segment {
     pub mBegin: u32,
     pub mLength: u32,
 }
+impl ::std::clone::Clone for nsCString_Segment {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCString_Segment() {
     assert_eq!(::std::mem::size_of::<nsCString_Segment>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsCString_Segment>() , 4usize);
 }
 #[test]
 fn bindgen_test_layout_nsCString() {
     assert_eq!(::std::mem::size_of::<nsCString>() , 16usize);
@@ -1550,17 +1581,17 @@ fn bindgen_test_layout_nsFixedCString() 
     assert_eq!(::std::mem::align_of::<nsFixedCString>() , 8usize);
 }
 #[repr(C)]
 pub struct nsAutoCString {
     pub _base: nsFixedCString,
     pub mStorage: [::std::os::raw::c_char; 64usize],
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsAutoCString_nsTString_h_unnamed_4 { kDefaultStorageSize = 64, }
 #[test]
 fn bindgen_test_layout_nsAutoCString() {
     assert_eq!(::std::mem::size_of::<nsAutoCString>() , 96usize);
     assert_eq!(::std::mem::align_of::<nsAutoCString>() , 8usize);
 }
 #[repr(C)]
 pub struct nsXPIDLCString {
@@ -1632,17 +1663,17 @@ pub struct NS_ConvertUTF8toUTF16 {
 #[test]
 fn bindgen_test_layout_NS_ConvertUTF8toUTF16() {
     assert_eq!(::std::mem::size_of::<NS_ConvertUTF8toUTF16>() , 160usize);
     assert_eq!(::std::mem::align_of::<NS_ConvertUTF8toUTF16>() , 8usize);
 }
 pub type nsVoidableString = nsAutoString;
 pub enum ErrorReporter { }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSTokenType {
     eCSSToken_Whitespace = 0,
     eCSSToken_Comment = 1,
     eCSSToken_Ident = 2,
     eCSSToken_Function = 3,
     eCSSToken_AtKeyword = 4,
     eCSSToken_ID = 5,
     eCSSToken_Hash = 6,
@@ -1658,17 +1689,17 @@ pub enum nsCSSTokenType {
     eCSSToken_Dashmatch = 16,
     eCSSToken_Beginsmatch = 17,
     eCSSToken_Endsmatch = 18,
     eCSSToken_Containsmatch = 19,
     eCSSToken_URange = 20,
     eCSSToken_HTMLComment = 21,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSTokenSerializationType {
     eCSSTokenSerialization_Nothing = 0,
     eCSSTokenSerialization_Whitespace = 1,
     eCSSTokenSerialization_AtKeyword_or_Hash = 2,
     eCSSTokenSerialization_Number = 3,
     eCSSTokenSerialization_Dimension = 4,
     eCSSTokenSerialization_Percentage = 5,
     eCSSTokenSerialization_URange = 6,
@@ -1703,33 +1734,36 @@ pub struct nsCSSToken {
     pub mHasSign: bool,
 }
 #[test]
 fn bindgen_test_layout_nsCSSToken() {
     assert_eq!(::std::mem::size_of::<nsCSSToken>() , 184usize);
     assert_eq!(::std::mem::align_of::<nsCSSToken>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCSSScannerPosition {
     pub mOffset: u32,
     pub mLineNumber: u32,
     pub mLineOffset: u32,
     pub mTokenLineNumber: u32,
     pub mTokenLineOffset: u32,
     pub mTokenOffset: u32,
     pub mInitialized: bool,
 }
+impl ::std::clone::Clone for nsCSSScannerPosition {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCSSScannerPosition() {
     assert_eq!(::std::mem::size_of::<nsCSSScannerPosition>() , 28usize);
     assert_eq!(::std::mem::align_of::<nsCSSScannerPosition>() , 4usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSScannerExclude {
     eCSSScannerExclude_None = 0,
     eCSSScannerExclude_Comments = 1,
     eCSSScannerExclude_WhitespaceAndComments = 2,
 }
 #[repr(C)]
 pub struct nsCSSScanner {
     pub mBuffer: *const ::std::os::raw::c_ushort,
@@ -1744,17 +1778,17 @@ pub struct nsCSSScanner {
     pub mEOFCharacters: nsCSSScanner_EOFCharacters,
     pub mReporter: *mut ErrorReporter,
     pub mSVGMode: bool,
     pub mRecording: bool,
     pub mSeenBadToken: bool,
     pub mSeenVariableReference: bool,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSScanner_EOFCharacters {
     eEOFCharacters_None = 0,
     eEOFCharacters_DropBackslash = 1,
     eEOFCharacters_ReplacementChar = 2,
     eEOFCharacters_Asterisk = 4,
     eEOFCharacters_Slash = 8,
     eEOFCharacters_DoubleQuote = 16,
     eEOFCharacters_SingleQuote = 32,
@@ -1772,115 +1806,134 @@ pub struct nsCSSGridTemplateAreaToken {
 }
 #[test]
 fn bindgen_test_layout_nsCSSGridTemplateAreaToken() {
     assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaToken>() ,
                168usize);
     assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaToken>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCSSGridTemplateAreaScanner {
     pub mBuffer: *const ::std::os::raw::c_ushort,
     pub mOffset: u32,
     pub mCount: u32,
 }
+impl ::std::clone::Clone for nsCSSGridTemplateAreaScanner {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCSSGridTemplateAreaScanner() {
     assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaScanner>() ,
                16usize);
     assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaScanner>() ,
                8usize);
 }
 /**
  * A "unique identifier". This is modeled after OSF DCE UUIDs.
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsID {
     pub m0: u32,
     pub m1: u16,
     pub m2: u16,
     pub m3: [u8; 8usize],
 }
+impl ::std::clone::Clone for nsID {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsID() {
     assert_eq!(::std::mem::size_of::<nsID>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsID>() , 4usize);
 }
 /**
  * A stack helper class to convert a nsID to a string.  Useful
  * for printing nsIDs.  For example:
  *   nsID aID = ...;
  *   printf("%s", nsIDToCString(aID).get());
  */
-/*
- * Rust chokes on generating Clone for arrays wider than 32. Keep
- * this commented out until we have a fix in bindgen.
- * #[repr(C)]
-#[derive(Copy, Clone)]
+#[repr(C)]
+#[derive(Copy)]
 pub struct nsIDToCString {
     pub mStringBytes: [::std::os::raw::c_char; 39usize],
 }
+impl ::std::clone::Clone for nsIDToCString {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsIDToCString() {
     assert_eq!(::std::mem::size_of::<nsIDToCString>() , 39usize);
     assert_eq!(::std::mem::align_of::<nsIDToCString>() , 1usize);
-} */
+}
 pub type nsCID = nsID;
 /**
  * An "interface id" which can be used to uniquely identify a given
  * interface.
  */
 pub type nsIID = nsID;
 /**
  * Basic component object model interface. Objects which implement
  * this interface support runtime interface discovery (QueryInterface)
  * and a reference counted memory model (AddRef/Release). This is
  * modelled after the win32 IUnknown API.
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsISupports {
     pub _vftable: *const _vftable_nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsISupports {
+    pub _bindgen_empty_ctype_warning_fix: u64,
+}
+impl ::std::clone::Clone for nsISupports {
+    fn clone(&self) -> Self { *self }
 }
 #[test]
 fn bindgen_test_layout_nsISupports() {
     assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsISupports>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsAutoOwningThread {
     pub mThread: *mut ::std::os::raw::c_void,
 }
+impl ::std::clone::Clone for nsAutoOwningThread {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsAutoOwningThread() {
     assert_eq!(::std::mem::size_of::<nsAutoOwningThread>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsAutoOwningThread>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCycleCollectingAutoRefCnt {
     pub mRefCntAndFlags: usize,
 }
+impl ::std::clone::Clone for nsCycleCollectingAutoRefCnt {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() {
     assert_eq!(::std::mem::size_of::<nsCycleCollectingAutoRefCnt>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsCycleCollectingAutoRefCnt>() ,
                8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsAutoRefCnt {
     pub mValue: nsrefcnt,
 }
+impl ::std::clone::Clone for nsAutoRefCnt {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsAutoRefCnt() {
     assert_eq!(::std::mem::size_of::<nsAutoRefCnt>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsAutoRefCnt>() , 8usize);
 }
 #[repr(C)]
 pub struct ThreadSafeAutoRefCnt {
     pub mValue: u64,
@@ -1900,21 +1953,24 @@ fn bindgen_test_layout_ThreadSafeAutoRef
  * Macro-driven QueryInterface generates a QueryInterface function directly
  * using common macros. This is necessary if special QueryInterface features
  * are being used (such as tearoffs and conditional interfaces).
  *
  * These methods can be combined into a table-driven function call followed
  * by custom code for tearoffs and conditionals.
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct QITableEntry {
     pub iid: *const nsIID,
     pub offset: i32,
 }
+impl ::std::clone::Clone for QITableEntry {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_QITableEntry() {
     assert_eq!(::std::mem::size_of::<QITableEntry>() , 16usize);
     assert_eq!(::std::mem::align_of::<QITableEntry>() , 8usize);
 }
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct RefPtrTraits<U> {
@@ -1926,77 +1982,98 @@ pub struct RefPtr<T> {
 }
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct RefPtrGetterAddRefs<T> {
     pub mTargetSmartPtr: *mut RefPtr<T>,
     pub _phantom0: ::std::marker::PhantomData<T>,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsCOMPtr_helper;
+impl ::std::clone::Clone for nsCOMPtr_helper {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsQueryInterface {
     pub mRawPtr: *mut nsISupports,
 }
+impl ::std::clone::Clone for nsQueryInterface {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsQueryInterface() {
     assert_eq!(::std::mem::size_of::<nsQueryInterface>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsQueryInterface>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsQueryInterfaceWithError {
     pub mRawPtr: *mut nsISupports,
     pub mErrorPtr: *mut nsresult,
 }
+impl ::std::clone::Clone for nsQueryInterfaceWithError {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsQueryInterfaceWithError() {
     assert_eq!(::std::mem::size_of::<nsQueryInterfaceWithError>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsQueryInterfaceWithError>() , 8usize);
 }
 ////////////////////////////////////////////////////////////////////////////
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsGetServiceByCID {
     pub mCID: *const nsCID,
 }
+impl ::std::clone::Clone for nsGetServiceByCID {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsGetServiceByCID() {
     assert_eq!(::std::mem::size_of::<nsGetServiceByCID>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsGetServiceByCID>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsGetServiceByCIDWithError {
     pub mCID: *const nsCID,
     pub mErrorPtr: *mut nsresult,
 }
+impl ::std::clone::Clone for nsGetServiceByCIDWithError {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsGetServiceByCIDWithError() {
     assert_eq!(::std::mem::size_of::<nsGetServiceByCIDWithError>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsGetServiceByCIDWithError>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsGetServiceByContractID {
     pub mContractID: *const ::std::os::raw::c_char,
 }
+impl ::std::clone::Clone for nsGetServiceByContractID {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsGetServiceByContractID() {
     assert_eq!(::std::mem::size_of::<nsGetServiceByContractID>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsGetServiceByContractID>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsGetServiceByContractIDWithError {
     pub mContractID: *const ::std::os::raw::c_char,
     pub mErrorPtr: *mut nsresult,
 }
+impl ::std::clone::Clone for nsGetServiceByContractIDWithError {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsGetServiceByContractIDWithError() {
     assert_eq!(::std::mem::size_of::<nsGetServiceByContractIDWithError>() ,
                16usize);
     assert_eq!(::std::mem::align_of::<nsGetServiceByContractIDWithError>() ,
                8usize);
 }
 /**
@@ -2048,20 +2125,23 @@ pub struct nsAutoPtr<T> {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct nsAutoPtrGetterTransfers<T> {
     pub mTargetSmartPtr: *mut nsAutoPtr<T>,
     pub _phantom0: ::std::marker::PhantomData<T>,
 }
 pub type PLDHashNumber = u32;
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct PLDHashEntryHdr {
     pub mKeyHash: PLDHashNumber,
 }
+impl ::std::clone::Clone for PLDHashEntryHdr {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_PLDHashEntryHdr() {
     assert_eq!(::std::mem::size_of::<PLDHashEntryHdr>() , 4usize);
     assert_eq!(::std::mem::align_of::<PLDHashEntryHdr>() , 4usize);
 }
 #[repr(C)]
 pub struct Checker {
     pub mState: u32,
@@ -2078,17 +2158,17 @@ pub struct PLDHashTable {
     pub mHashShift: i16,
     pub mEntrySize: u32,
     pub mEntryCount: u32,
     pub mRemovedCount: u32,
     pub mEntryStore: [u64; 2usize],
     pub mChecker: Checker,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, }
 #[test]
 fn bindgen_test_layout_PLDHashTable() {
     assert_eq!(::std::mem::size_of::<PLDHashTable>() , 48usize);
     assert_eq!(::std::mem::align_of::<PLDHashTable>() , 8usize);
 }
 pub type PLDHashHashKey =
     ::std::option::Option<unsafe extern "C" fn(aKey:
@@ -2106,35 +2186,41 @@ pub type PLDHashMoveEntry =
 pub type PLDHashClearEntry =
     ::std::option::Option<unsafe extern "C" fn(aTable: *mut PLDHashTable,
                                                aEntry: *mut PLDHashEntryHdr)>;
 pub type PLDHashInitEntry =
     ::std::option::Option<unsafe extern "C" fn(aEntry: *mut PLDHashEntryHdr,
                                                aKey:
                                                    *const ::std::os::raw::c_void)>;
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct PLDHashTableOps {
     pub hashKey: PLDHashHashKey,
     pub matchEntry: PLDHashMatchEntry,
     pub moveEntry: PLDHashMoveEntry,
     pub clearEntry: PLDHashClearEntry,
     pub initEntry: PLDHashInitEntry,
 }
+impl ::std::clone::Clone for PLDHashTableOps {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_PLDHashTableOps() {
     assert_eq!(::std::mem::size_of::<PLDHashTableOps>() , 40usize);
     assert_eq!(::std::mem::align_of::<PLDHashTableOps>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct PLDHashEntryStub {
     pub _base: PLDHashEntryHdr,
     pub key: *const ::std::os::raw::c_void,
 }
+impl ::std::clone::Clone for PLDHashEntryStub {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_PLDHashEntryStub() {
     assert_eq!(::std::mem::size_of::<PLDHashEntryStub>() , 16usize);
     assert_eq!(::std::mem::align_of::<PLDHashEntryStub>() , 8usize);
 }
 /**
  * a base class for templated hashtables.
  *
@@ -2186,16 +2272,17 @@ fn bindgen_test_layout_PLDHashEntryStub(
  * @see nsClassHashtable
  * @author "Benjamin Smedberg <bsmedberg@covad.net>"
  */
 #[repr(C)]
 pub struct nsTHashtable<EntryType> {
     pub mTable: PLDHashTable,
     pub _phantom0: ::std::marker::PhantomData<EntryType>,
 }
+#[repr(C)]
 pub struct nsDataHashtable;
 #[test]
 fn bindgen_test_layout_nsDataHashtable() {
     assert_eq!(::std::mem::size_of::<nsDataHashtable>() , 0usize);
     assert_eq!(::std::mem::align_of::<nsDataHashtable>() , 0usize);
 }
 pub enum CSSVariableResolver { }
 #[repr(C)]
@@ -2216,33 +2303,34 @@ fn bindgen_test_layout_CSSVariableValues
     assert_eq!(::std::mem::align_of::<CSSVariableValues_Variable>() , 8usize);
 }
 #[test]
 fn bindgen_test_layout_CSSVariableValues() {
     assert_eq!(::std::mem::size_of::<CSSVariableValues>() , 56usize);
     assert_eq!(::std::mem::align_of::<CSSVariableValues>() , 8usize);
 }
 #[repr(i8)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum SheetType {
     Agent = 0,
     User = 1,
     PresHint = 2,
     SVGAttrAnimation = 3,
     Doc = 4,
     ScopedDoc = 5,
     StyleAttr = 6,
     Override = 7,
     Animation = 8,
     Transition = 9,
     Count = 10,
     Unknown = -1,
 }
 pub type nscolor = u32;
 pub type nscoord = i32;
+#[repr(C)]
 pub struct nsIntPoint {
     pub _bindgen_opaque_blob: [u32; 2usize],
 }
 #[test]
 fn bindgen_test_layout_nsIntPoint() {
     assert_eq!(::std::mem::size_of::<nsIntPoint>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsIntPoint>() , 4usize);
 }
@@ -2251,42 +2339,49 @@ fn bindgen_test_layout_nsIntPoint() {
  * simpler Rust types, to aid Rust binding generation.
  *
  * If something in this types or the assertions below needs to change, ask
  * bholley, heycam or emilio before!
  *
  * <div rustbindgen="true" replaces="nsPoint">
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsPoint {
     pub x: nscoord,
     pub y: nscoord,
 }
+impl ::std::clone::Clone for nsPoint {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsPoint() {
     assert_eq!(::std::mem::size_of::<nsPoint>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsPoint>() , 4usize);
 }
 /**
  * <div rustbindgen="true" replaces="nsMargin">
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsMargin {
     pub top: nscoord,
     pub right: nscoord,
     pub bottom: nscoord,
     pub left: nscoord,
 }
+impl ::std::clone::Clone for nsMargin {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsMargin() {
     assert_eq!(::std::mem::size_of::<nsMargin>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsMargin>() , 4usize);
 }
+#[repr(C)]
 pub struct nsIntMargin {
     pub _bindgen_opaque_blob: [u32; 4usize],
 }
 #[test]
 fn bindgen_test_layout_nsIntMargin() {
     assert_eq!(::std::mem::size_of::<nsIntMargin>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsIntMargin>() , 4usize);
 }
@@ -2297,31 +2392,31 @@ pub const eFamily_generic_last: FontFami
 pub const eFamily_generic_count: FontFamilyType =
     FontFamilyType::eFamily_monospace;
 /**
  * type of font family name, either a name (e.g. Helvetica) or a
  * generic (e.g. serif, sans-serif), with the ability to distinguish
  * between unquoted and quoted names for serializaiton
  */
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum FontFamilyType {
     eFamily_none = 0,
     eFamily_named = 1,
     eFamily_named_quoted = 2,
     eFamily_serif = 3,
     eFamily_sans_serif = 4,
     eFamily_monospace = 5,
     eFamily_cursive = 6,
     eFamily_fantasy = 7,
     eFamily_moz_variable = 8,
     eFamily_moz_fixed = 9,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum QuotedName { eQuotedName = 0, eUnquotedName = 1, }
 /**
  * font family name, a string for the name if not a generic and
  * a font type indicated named family or which generic family
  */
 #[repr(C)]
 pub struct FontFamilyName {
     pub mType: FontFamilyType,
@@ -2343,36 +2438,40 @@ pub struct FontFamilyList {
     pub mDefaultFontType: FontFamilyType,
 }
 #[test]
 fn bindgen_test_layout_FontFamilyList() {
     assert_eq!(::std::mem::size_of::<FontFamilyList>() , 16usize);
     assert_eq!(::std::mem::align_of::<FontFamilyList>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct gfxFontFeature {
     pub mTag: u32,
     pub mValue: u32,
 }
+impl ::std::clone::Clone for gfxFontFeature {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_gfxFontFeature() {
     assert_eq!(::std::mem::size_of::<gfxFontFeature>() , 8usize);
     assert_eq!(::std::mem::align_of::<gfxFontFeature>() , 4usize);
 }
 #[repr(C)]
 pub struct gfxAlternateValue {
     pub alternate: u32,
     pub value: nsString,
 }
 #[test]
 fn bindgen_test_layout_gfxAlternateValue() {
     assert_eq!(::std::mem::size_of::<gfxAlternateValue>() , 24usize);
     assert_eq!(::std::mem::align_of::<gfxAlternateValue>() , 8usize);
 }
+#[repr(C)]
 pub struct gfxFontFeatureValueSet {
     pub _bindgen_opaque_blob: [u64; 8usize],
 }
 #[test]
 fn bindgen_test_layout_gfxFontFeatureValueSet() {
     assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet>() , 64usize);
     assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet>() , 8usize);
 }
@@ -2406,63 +2505,67 @@ pub struct nsFont {
     pub fontFeatureSettings: u64,
     pub languageOverride: nsString,
 }
 #[test]
 fn bindgen_test_layout_nsFont() {
     assert_eq!(::std::mem::size_of::<nsFont>() , 88usize);
     assert_eq!(::std::mem::align_of::<nsFont>() , 8usize);
 }
+#[repr(C)]
 pub struct nsIntRect {
     pub _bindgen_opaque_blob: [u32; 4usize],
 }
 #[test]
 fn bindgen_test_layout_nsIntRect() {
     assert_eq!(::std::mem::size_of::<nsIntRect>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsIntRect>() , 4usize);
 }
 /**
  * <div rustbindgen="true" replaces="nsRect">
  */
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsRect {
     pub x: nscoord,
     pub y: nscoord,
     pub width: nscoord,
     pub height: nscoord,
 }
+impl ::std::clone::Clone for nsRect {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsRect() {
     assert_eq!(::std::mem::size_of::<nsRect>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsRect>() , 4usize);
 }
 #[repr(i8)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum StyleBoxSizing { Content = 0, Padding = 1, Border = 2, }
 pub enum PlaybackDirection { }
 pub enum FillMode { }
 pub enum WritingMode { }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum LogicalAxis { eLogicalAxisBlock = 0, eLogicalAxisInline = 1, }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum LogicalEdge { eLogicalEdgeStart = 0, eLogicalEdgeEnd = 1, }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum LogicalSide {
     eLogicalSideBStart = 0,
     eLogicalSideBEnd = 1,
     eLogicalSideIStart = 2,
     eLogicalSideIEnd = 3,
 }
 pub const eStyleUnit_MAX: nsStyleUnit = nsStyleUnit::eStyleUnit_Calc;
 #[repr(i8)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleUnit {
     eStyleUnit_Null = 0,
     eStyleUnit_Normal = 1,
     eStyleUnit_Auto = 2,
     eStyleUnit_None = 3,
     eStyleUnit_Percent = 10,
     eStyleUnit_Factor = 11,
     eStyleUnit_Degree = 12,
@@ -2471,42 +2574,48 @@ pub enum nsStyleUnit {
     eStyleUnit_Turn = 15,
     eStyleUnit_FlexFraction = 16,
     eStyleUnit_Coord = 20,
     eStyleUnit_Integer = 30,
     eStyleUnit_Enumerated = 32,
     eStyleUnit_Calc = 40,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleCoord_h_unnamed_5 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleCoord_h_unnamed_5 { }
+impl ::std::clone::Clone for nsStyleCoord_h_unnamed_5 {
+    fn clone(&self) -> Self { *self }
+}
 pub type nsStyleUnion = nsStyleCoord_h_unnamed_5;
 /**
  * Class that hold a single size specification used by the style
  * system.  The size specification consists of two parts -- a number
  * and a unit.  The number is an integer, a floating point value, an
  * nscoord, or undefined, and the unit is an nsStyleUnit.  Checking
  * the unit is a must before asking for the value in any particular
  * form.
  */
 #[repr(C)]
 pub struct nsStyleCoord {
     pub mUnit: nsStyleUnit,
     pub mValue: nsStyleUnion,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleCoord_CalcValue {
     pub mLength: nscoord,
     pub mPercent: f32,
     pub mHasPercent: bool,
 }
+impl ::std::clone::Clone for nsStyleCoord_CalcValue {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleCoord_CalcValue() {
     assert_eq!(::std::mem::size_of::<nsStyleCoord_CalcValue>() , 12usize);
     assert_eq!(::std::mem::align_of::<nsStyleCoord_CalcValue>() , 4usize);
 }
 #[repr(C)]
 pub struct nsStyleCoord_Calc {
     pub _base: nsStyleCoord_CalcValue,
@@ -2514,17 +2623,17 @@ pub struct nsStyleCoord_Calc {
     pub _mOwningThread: nsAutoOwningThread,
 }
 #[test]
 fn bindgen_test_layout_nsStyleCoord_Calc() {
     assert_eq!(::std::mem::size_of::<nsStyleCoord_Calc>() , 32usize);
     assert_eq!(::std::mem::align_of::<nsStyleCoord_Calc>() , 8usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleCoord_CoordConstructorType { CoordConstructor = 0, }
 #[test]
 fn bindgen_test_layout_nsStyleCoord() {
     assert_eq!(::std::mem::size_of::<nsStyleCoord>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsStyleCoord>() , 8usize);
 }
 /**
  * Class that represents a set of top/right/bottom/left nsStyleCoords.
@@ -2553,60 +2662,67 @@ pub struct nsStyleCorners {
 }
 #[test]
 fn bindgen_test_layout_nsStyleCorners() {
     assert_eq!(::std::mem::size_of::<nsStyleCorners>() , 72usize);
     assert_eq!(::std::mem::align_of::<nsStyleCorners>() , 8usize);
 }
 pub type nsLoadFlags = u32;
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsIRequest {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIRequest {
     pub _base: _vftable_nsISupports,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsIRequest_nsIRequest_h_unnamed_6 {
     LOAD_REQUESTMASK = 65535,
     LOAD_NORMAL = 0,
     LOAD_BACKGROUND = 1,
     INHIBIT_PIPELINE = 64,
     INHIBIT_CACHING = 128,
     INHIBIT_PERSISTENT_CACHING = 256,
     LOAD_BYPASS_CACHE = 512,
     LOAD_FROM_CACHE = 1024,
     VALIDATE_ALWAYS = 2048,
     VALIDATE_NEVER = 4096,
     VALIDATE_ONCE_PER_SESSION = 8192,
     LOAD_ANONYMOUS = 16384,
     LOAD_FRESH_CONNECTION = 32768,
 }
+impl ::std::clone::Clone for nsIRequest {
+    fn clone(&self) -> Self { *self }
+}
 pub enum nsIContentSecurityPolicy { }
 pub enum nsIDOMDocument { }
+#[repr(C)]
 pub struct nsIPrincipal {
     pub _bindgen_opaque_blob: u64,
 }
 #[test]
 fn bindgen_test_layout_nsIPrincipal() {
     assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsIExpandedPrincipal {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIExpandedPrincipal {
     pub _base: _vftable_nsISupports,
 }
+impl ::std::clone::Clone for nsIExpandedPrincipal {
+    fn clone(&self) -> Self { *self }
+}
 /**
  * This structure precedes the string buffers "we" allocate.  It may be the
  * case that nsTAString::mData does not point to one of these special
  * buffers.  The mFlags member variable distinguishes the buffer type.
  *
  * When this header is in use, it enables reference counting, and capacity
  * tracking.  NOTE: A string buffer can be modified only if its reference
  * count is 1.
@@ -2617,32 +2733,35 @@ pub struct nsStringBuffer {
     pub mStorageSize: u32,
 }
 #[test]
 fn bindgen_test_layout_nsStringBuffer() {
     assert_eq!(::std::mem::size_of::<nsStringBuffer>() , 8usize);
     assert_eq!(::std::mem::align_of::<nsStringBuffer>() , 4usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsIAtom {
     pub _base: nsISupports,
     pub mLength: u32,
     pub mHash: u32,
     /**
    * WARNING! There is an invisible constraint on |mString|: the chars it
    * points to must belong to an nsStringBuffer. This is so that the
    * nsStringBuffer::FromData() calls above are valid.
    */
     pub mString: *mut ::std::os::raw::c_ushort,
 }
 #[repr(C)]
 pub struct _vftable_nsIAtom {
     pub _base: _vftable_nsISupports,
 }
+impl ::std::clone::Clone for nsIAtom {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsIAtom() {
     assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize);
 }
 #[repr(C)]
 pub struct nsAtomString {
     pub _base: nsString,
@@ -2657,20 +2776,23 @@ pub struct nsAtomCString {
     pub _base: nsCString,
 }
 #[test]
 fn bindgen_test_layout_nsAtomCString() {
     assert_eq!(::std::mem::size_of::<nsAtomCString>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsAtomCString>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsDependentAtomString {
     pub _base: [u64; 2usize],
 }
+impl ::std::clone::Clone for nsDependentAtomString {
+    fn clone(&self) -> Self { *self }
+}
 /**
  * A class for holding strong references to handle-managed objects.
  *
  * This is intended for use with objects like StyleSheetHandle, where
  * the handle type is not a pointer but which can still have ->AddRef()
  * and ->Release() called on it.
  */
 #[repr(C)]
@@ -2704,38 +2826,41 @@ pub struct HandleRefPtr<T> {
  * (or a proxy for it) in which the object was allocated.
  */
 #[repr(C)]
 pub struct ArenaRefPtr<T> {
     pub mPtr: RefPtr<T>,
     pub _phantom0: ::std::marker::PhantomData<T>,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsIURI {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIURI {
     pub _base: _vftable_nsISupports,
 }
+impl ::std::clone::Clone for nsIURI {
+    fn clone(&self) -> Self { *self }
+}
 pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
     nsCSSProperty::eCSSProperty__x_text_zoom;
 pub const eCSSProperty__moz_outline_radius: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT_no_shorthands;
 pub const eCSSProperty_COUNT_DUMMY2: nsCSSProperty =
     nsCSSProperty::eCSSProperty__moz_transform;
 pub const eCSSPropertyAlias_MozTransformOrigin: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT;
 pub const eCSSProperty_COUNT_DUMMY3: nsCSSProperty =
     nsCSSProperty::eCSSPropertyAlias_WebkitUserSelect;
 pub const eCSSPropertyExtra_no_properties: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT_with_aliases;
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSProperty {
     eCSSProperty_UNKNOWN = -1,
     eCSSProperty_appearance = 0,
     eCSSProperty__moz_outline_radius_topLeft = 1,
     eCSSProperty__moz_outline_radius_topRight = 2,
     eCSSProperty__moz_outline_radius_bottomRight = 3,
     eCSSProperty__moz_outline_radius_bottomLeft = 4,
     eCSSProperty__moz_tab_size = 5,
@@ -3151,71 +3276,73 @@ pub enum nsCSSProperty {
     eCSSPropertyAlias_WebkitUserSelect = 415,
     eCSSProperty_COUNT_with_aliases = 416,
     eCSSPropertyExtra_all_properties = 417,
     eCSSPropertyExtra_x_none_value = 418,
     eCSSPropertyExtra_x_auto_value = 419,
     eCSSPropertyExtra_variable = 420,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSFontDesc {
     eCSSFontDesc_UNKNOWN = -1,
     eCSSFontDesc_Family = 0,
     eCSSFontDesc_Style = 1,
     eCSSFontDesc_Weight = 2,
     eCSSFontDesc_Stretch = 3,
     eCSSFontDesc_Src = 4,
     eCSSFontDesc_UnicodeRange = 5,
     eCSSFontDesc_FontFeatureSettings = 6,
     eCSSFontDesc_FontLanguageOverride = 7,
     eCSSFontDesc_Display = 8,
     eCSSFontDesc_COUNT = 9,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSCounterDesc {
     eCSSCounterDesc_UNKNOWN = -1,
     eCSSCounterDesc_System = 0,
     eCSSCounterDesc_Symbols = 1,
     eCSSCounterDesc_AdditiveSymbols = 2,
     eCSSCounterDesc_Negative = 3,
     eCSSCounterDesc_Prefix = 4,
     eCSSCounterDesc_Suffix = 5,
     eCSSCounterDesc_Range = 6,
     eCSSCounterDesc_Pad = 7,
     eCSSCounterDesc_Fallback = 8,
     eCSSCounterDesc_SpeakAs = 9,
     eCSSCounterDesc_COUNT = 10,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSPropertyLogicalGroup {
     eCSSPropertyLogicalGroup_UNKNOWN = -1,
     eCSSPropertyLogicalGroup_BorderColor = 0,
     eCSSPropertyLogicalGroup_BorderStyle = 1,
     eCSSPropertyLogicalGroup_BorderWidth = 2,
     eCSSPropertyLogicalGroup_Margin = 3,
     eCSSPropertyLogicalGroup_MaxSize = 4,
     eCSSPropertyLogicalGroup_Offset = 5,
     eCSSPropertyLogicalGroup_Padding = 6,
     eCSSPropertyLogicalGroup_MinSize = 7,
     eCSSPropertyLogicalGroup_Size = 8,
     eCSSPropertyLogicalGroup_WebkitBoxOrient = 9,
     eCSSPropertyLogicalGroup_COUNT = 10,
 }
 pub enum CSSStyleSheet { }
+#[repr(C)]
 pub struct URLValue {
     pub _bindgen_opaque_blob: [u64; 7usize],
 }
 #[test]
 fn bindgen_test_layout_URLValue() {
     assert_eq!(::std::mem::size_of::<URLValue>() , 56usize);
     assert_eq!(::std::mem::align_of::<URLValue>() , 8usize);
 }
+#[repr(C)]
 pub struct ImageValue {
     pub _bindgen_opaque_blob: [u64; 13usize],
 }
 #[test]
 fn bindgen_test_layout_ImageValue() {
     assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize);
     assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize);
 }
@@ -3252,17 +3379,17 @@ pub struct FontFamilyListRefCnt {
     pub _mOwningThread: nsAutoOwningThread,
 }
 #[test]
 fn bindgen_test_layout_FontFamilyListRefCnt() {
     assert_eq!(::std::mem::size_of::<FontFamilyListRefCnt>() , 32usize);
     assert_eq!(::std::mem::align_of::<FontFamilyListRefCnt>() , 8usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSUnit {
     eCSSUnit_Null = 0,
     eCSSUnit_Auto = 1,
     eCSSUnit_Inherit = 2,
     eCSSUnit_Initial = 3,
     eCSSUnit_Unset = 4,
     eCSSUnit_None = 5,
     eCSSUnit_Normal = 6,
@@ -3342,24 +3469,27 @@ pub enum nsCSSUnit {
     eCSSUnit_FlexFraction = 4000,
 }
 #[repr(C)]
 pub struct nsCSSValue {
     pub mUnit: nsCSSUnit,
     pub mValue: nsCSSValue_nsCSSValue_h_unnamed_8,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsCSSValue_Serialization { eNormalized = 0, eAuthorSpecified = 1, }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsCSSValue_nsCSSValue_h_unnamed_8 {
     pub _bindgen_data_: u64,
 }
 impl nsCSSValue_nsCSSValue_h_unnamed_8 { }
+impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_8 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsCSSValue() {
     assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize);
 }
 #[repr(C)]
 pub struct Array {
     pub mRefCnt: usize,
@@ -3561,56 +3691,63 @@ pub struct nsCSSCornerSizes {
     pub mBottomLeft: nsCSSValue,
 }
 #[test]
 fn bindgen_test_layout_nsCSSCornerSizes() {
     assert_eq!(::std::mem::size_of::<nsCSSCornerSizes>() , 64usize);
     assert_eq!(::std::mem::align_of::<nsCSSCornerSizes>() , 8usize);
 }
 pub enum imgIContainer { }
+#[repr(C)]
 pub struct imgIRequest {
     pub _bindgen_opaque_blob: u64,
 }
 #[test]
 fn bindgen_test_layout_imgIRequest() {
     assert_eq!(::std::mem::size_of::<imgIRequest>() , 8usize);
     assert_eq!(::std::mem::align_of::<imgIRequest>() , 8usize);
 }
 pub enum imgStatusNotifyRunnable { }
 pub enum ProxyBehaviour { }
 pub enum Image { }
 pub enum ImageURL { }
 pub enum ProgressTracker { }
+#[repr(C)]
 pub struct imgRequestProxy {
     pub _bindgen_opaque_blob: [u64; 15usize],
 }
 #[test]
 fn bindgen_test_layout_imgRequestProxy() {
     assert_eq!(::std::mem::size_of::<imgRequestProxy>() , 120usize);
     assert_eq!(::std::mem::align_of::<imgRequestProxy>() , 8usize);
 }
+#[repr(C)]
 pub struct imgRequestProxyStatic {
     pub _bindgen_opaque_blob: [u64; 16usize],
 }
 #[test]
 fn bindgen_test_layout_imgRequestProxyStatic() {
     assert_eq!(::std::mem::size_of::<imgRequestProxyStatic>() , 128usize);
     assert_eq!(::std::mem::align_of::<imgRequestProxyStatic>() , 8usize);
 }
 pub type CounterValue = i32;
 pub enum NegativeType { }
 pub enum PadType { }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct CounterStyle {
     pub _vftable: *const _vftable_CounterStyle,
     pub mStyle: i32,
 }
 #[repr(C)]
 pub struct _vftable_CounterStyle {
+    pub _bindgen_empty_ctype_warning_fix: u64,
+}
+impl ::std::clone::Clone for CounterStyle {
+    fn clone(&self) -> Self { *self }
 }
 #[test]
 fn bindgen_test_layout_CounterStyle() {
     assert_eq!(::std::mem::size_of::<CounterStyle>() , 16usize);
     assert_eq!(::std::mem::align_of::<CounterStyle>() , 8usize);
 }
 #[repr(C)]
 pub struct AnonymousCounterStyle {
@@ -3625,16 +3762,17 @@ pub struct AnonymousCounterStyle {
 pub struct _vftable_AnonymousCounterStyle {
     pub _base: _vftable_CounterStyle,
 }
 #[test]
 fn bindgen_test_layout_AnonymousCounterStyle() {
     assert_eq!(::std::mem::size_of::<AnonymousCounterStyle>() , 48usize);
     assert_eq!(::std::mem::align_of::<AnonymousCounterStyle>() , 8usize);
 }
+#[repr(C)]
 pub struct CounterStyleManager {
     pub _bindgen_opaque_blob: [u64; 9usize],
 }
 #[test]
 fn bindgen_test_layout_CounterStyleManager() {
     assert_eq!(::std::mem::size_of::<CounterStyleManager>() , 72usize);
     assert_eq!(::std::mem::align_of::<CounterStyleManager>() , 8usize);
 }
@@ -3689,17 +3827,17 @@ pub struct nsStyleGradient {
     pub _mOwningThread: nsAutoOwningThread,
 }
 #[test]
 fn bindgen_test_layout_nsStyleGradient() {
     assert_eq!(::std::mem::size_of::<nsStyleGradient>() , 112usize);
     assert_eq!(::std::mem::align_of::<nsStyleGradient>() , 8usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleImageType {
     eStyleImageType_Null = 0,
     eStyleImageType_Image = 1,
     eStyleImageType_Gradient = 2,
     eStyleImageType_Element = 3,
 }
 /**
  * Represents a paintable image of one of the following types.
@@ -3715,21 +3853,24 @@ pub enum nsStyleImageType {
 pub struct nsStyleImage {
     pub mSubImages: u64,
     pub mType: nsStyleImageType,
     pub nsStyleStruct_h_unnamed_11: nsStyleImage_nsStyleStruct_h_unnamed_11,
     pub mCropRect: nsAutoPtr<nsStyleSides>,
     pub mImageTracked: bool,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleImage_nsStyleStruct_h_unnamed_11 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleImage_nsStyleStruct_h_unnamed_11 { }
+impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_11 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImage() {
     assert_eq!(::std::mem::size_of::<nsStyleImage>() , 40usize);
     assert_eq!(::std::mem::align_of::<nsStyleImage>() , 8usize);
 }
 #[repr(C)]
 pub struct nsStyleColor {
     pub mColor: nscolor,
@@ -3749,83 +3890,95 @@ pub struct nsStyleImageLayers {
     pub mImageCount: u32,
     pub mSizeCount: u32,
     pub mMaskModeCount: u32,
     pub mBlendModeCount: u32,
     pub mCompositeCount: u32,
     pub mLayers: [u64; 16usize],
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_12 {
     shorthand = 0,
     color = 1,
     image = 2,
     repeat = 3,
     position = 4,
     clip = 5,
     origin = 6,
     size = 7,
     attachment = 8,
     maskMode = 9,
     composite = 10,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleImageLayers_Position {
     pub mXPosition: nsStyleCoord_CalcValue,
     pub mYPosition: nsStyleCoord_CalcValue,
 }
+impl ::std::clone::Clone for nsStyleImageLayers_Position {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImageLayers_Position() {
     assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Position>() ,
                24usize);
     assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Position>() ,
                4usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleImageLayers_Size {
     pub mWidth: nsStyleImageLayers_Size_Dimension,
     pub mHeight: nsStyleImageLayers_Size_Dimension,
     pub mWidthType: u8,
     pub mHeightType: u8,
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleImageLayers_Size_Dimension {
     pub _base: nsStyleCoord_CalcValue,
 }
+impl ::std::clone::Clone for nsStyleImageLayers_Size_Dimension {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImageLayers_Size_Dimension() {
     assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size_Dimension>() ,
                12usize);
     assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size_Dimension>() ,
                4usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleImageLayers_Size_DimensionType {
     eContain = 0,
     eCover = 1,
     eAuto = 2,
     eLengthPercentage = 3,
     eDimensionType_COUNT = 4,
 }
+impl ::std::clone::Clone for nsStyleImageLayers_Size {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImageLayers_Size() {
     assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size>() , 28usize);
     assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size>() , 4usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleImageLayers_Repeat {
     pub mXRepeat: u8,
     pub mYRepeat: u8,
 }
+impl ::std::clone::Clone for nsStyleImageLayers_Repeat {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImageLayers_Repeat() {
     assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Repeat>() , 2usize);
     assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Repeat>() , 1usize);
 }
 #[repr(C)]
 pub struct nsStyleImageLayers_Layer {
     pub mImage: nsStyleImage,
@@ -4107,35 +4260,38 @@ pub struct nsStyleText {
     pub mTextEmphasisStyleString: nsString,
 }
 #[test]
 fn bindgen_test_layout_nsStyleText() {
     assert_eq!(::std::mem::size_of::<nsStyleText>() , 120usize);
     assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsStyleImageOrientation {
     pub mOrientation: u8,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleImageOrientation_Bits {
     ORIENTATION_MASK = 3,
     FLIP_MASK = 4,
     FROM_IMAGE_MASK = 8,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleImageOrientation_Angles {
     ANGLE_0 = 0,
     ANGLE_90 = 1,
     ANGLE_180 = 2,
     ANGLE_270 = 3,
 }
+impl ::std::clone::Clone for nsStyleImageOrientation {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleImageOrientation() {
     assert_eq!(::std::mem::size_of::<nsStyleImageOrientation>() , 1usize);
     assert_eq!(::std::mem::align_of::<nsStyleImageOrientation>() , 1usize);
 }
 #[repr(C)]
 pub struct nsStyleVisibility {
     pub mImageOrientation: nsStyleImageOrientation,
@@ -4146,50 +4302,56 @@ pub struct nsStyleVisibility {
     pub mTextOrientation: u8,
 }
 #[test]
 fn bindgen_test_layout_nsStyleVisibility() {
     assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 6usize);
     assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsTimingFunction {
     pub mType: nsTimingFunction_Type,
     pub nsStyleStruct_h_unnamed_13: nsTimingFunction_nsStyleStruct_h_unnamed_13,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsTimingFunction_Type {
     Ease = 0,
     Linear = 1,
     EaseIn = 2,
     EaseOut = 3,
     EaseInOut = 4,
     StepStart = 5,
     StepEnd = 6,
     CubicBezier = 7,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsTimingFunction_StepSyntax {
     Keyword = 0,
     FunctionalWithoutKeyword = 1,
     FunctionalWithStartKeyword = 2,
     FunctionalWithEndKeyword = 3,
 }
 #[repr(i32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsTimingFunction_nsStyleStruct_h_unnamed_13 {
     pub _bindgen_data_: [u32; 4usize],
 }
 impl nsTimingFunction_nsStyleStruct_h_unnamed_13 { }
+impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_13 {
+    fn clone(&self) -> Self { *self }
+}
+impl ::std::clone::Clone for nsTimingFunction {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsTimingFunction() {
     assert_eq!(::std::mem::size_of::<nsTimingFunction>() , 20usize);
     assert_eq!(::std::mem::align_of::<nsTimingFunction>() , 4usize);
 }
 #[repr(C)]
 pub struct StyleTransition {
     pub mTimingFunction: nsTimingFunction,
@@ -4300,17 +4462,17 @@ pub struct nsStyleTableBorder {
     pub mEmptyCells: u8,
 }
 #[test]
 fn bindgen_test_layout_nsStyleTableBorder() {
     assert_eq!(::std::mem::size_of::<nsStyleTableBorder>() , 12usize);
     assert_eq!(::std::mem::align_of::<nsStyleTableBorder>() , 4usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleContentType {
     eStyleContentType_String = 1,
     eStyleContentType_Image = 10,
     eStyleContentType_Attr = 20,
     eStyleContentType_Counter = 30,
     eStyleContentType_Counters = 31,
     eStyleContentType_OpenQuote = 40,
     eStyleContentType_CloseQuote = 41,
@@ -4321,21 +4483,24 @@ pub enum nsStyleContentType {
 }
 #[repr(C)]
 pub struct nsStyleContentData {
     pub mType: nsStyleContentType,
     pub mContent: nsStyleContentData_nsStyleStruct_h_unnamed_16,
     pub mImageTracked: bool,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleContentData_nsStyleStruct_h_unnamed_16 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleContentData_nsStyleStruct_h_unnamed_16 { }
+impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_16 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleContentData() {
     assert_eq!(::std::mem::size_of::<nsStyleContentData>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsStyleContentData>() , 8usize);
 }
 #[repr(C)]
 pub struct nsStyleCounterData {
     pub mCounter: nsString,
@@ -4438,43 +4603,46 @@ pub struct nsStyleColumn {
     pub mTwipsPerPixel: nscoord,
 }
 #[test]
 fn bindgen_test_layout_nsStyleColumn() {
     assert_eq!(::std::mem::size_of::<nsStyleColumn>() , 56usize);
     assert_eq!(::std::mem::align_of::<nsStyleColumn>() , 8usize);
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleSVGPaintType {
     eStyleSVGPaintType_None = 1,
     eStyleSVGPaintType_Color = 2,
     eStyleSVGPaintType_Server = 3,
     eStyleSVGPaintType_ContextFill = 4,
     eStyleSVGPaintType_ContextStroke = 5,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleSVGOpacitySource {
     eStyleSVGOpacitySource_Normal = 0,
     eStyleSVGOpacitySource_ContextFillOpacity = 1,
     eStyleSVGOpacitySource_ContextStrokeOpacity = 2,
 }
 #[repr(C)]
 pub struct nsStyleSVGPaint {
     pub mPaint: nsStyleSVGPaint_nsStyleStruct_h_unnamed_17,
     pub mType: nsStyleSVGPaintType,
     pub mFallbackColor: nscolor,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_17 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_17 { }
+impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_17 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleSVGPaint() {
     assert_eq!(::std::mem::size_of::<nsStyleSVGPaint>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsStyleSVGPaint>() , 8usize);
 }
 #[repr(C)]
 pub struct nsStyleSVG {
     pub mFill: nsStyleSVGPaint,
@@ -4515,17 +4683,17 @@ pub struct nsStyleBasicShape {
     pub _mOwningThread: nsAutoOwningThread,
     pub mType: nsStyleBasicShape_Type,
     pub mFillRule: i32,
     pub mCoordinates: u64,
     pub mPosition: nsStyleImageLayers_Position,
     pub mRadius: nsStyleCorners,
 }
 #[repr(u32)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Debug, Copy, Clone)]
 pub enum nsStyleBasicShape_Type {
     eInset = 0,
     eCircle = 1,
     eEllipse = 2,
     ePolygon = 3,
 }
 #[test]
 fn bindgen_test_layout_nsStyleBasicShape() {
@@ -4534,46 +4702,55 @@ fn bindgen_test_layout_nsStyleBasicShape
 }
 #[repr(C)]
 pub struct nsStyleClipPath {
     pub mType: i32,
     pub nsStyleStruct_h_unnamed_18: nsStyleClipPath_nsStyleStruct_h_unnamed_18,
     pub mSizingBox: u8,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleClipPath_nsStyleStruct_h_unnamed_18 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleClipPath_nsStyleStruct_h_unnamed_18 { }
+impl ::std::clone::Clone for nsStyleClipPath_nsStyleStruct_h_unnamed_18 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleClipPath() {
     assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
 }
 #[repr(C)]
 pub struct nsStyleFilter {
     pub mType: i32,
     pub mFilterParameter: nsStyleCoord,
     pub nsStyleStruct_h_unnamed_19: nsStyleFilter_nsStyleStruct_h_unnamed_19,
 }
 #[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Debug)]
 pub struct nsStyleFilter_nsStyleStruct_h_unnamed_19 {
     pub _bindgen_data_: u64,
 }
 impl nsStyleFilter_nsStyleStruct_h_unnamed_19 { }
+impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_19 {
+    fn clone(&self) -> Self { *self }
+}
 #[test]
 fn bindgen_test_layout_nsStyleFilter() {
     assert_eq!(::std::mem::size_of::<nsStyleFilter>() , 32usize);
     assert_eq!(::std::mem::align_of::<nsStyleFilter>() , 8usize);
 }
 #[repr(C)]
-#[derive(Copy, Clone)]
+#[derive(Copy)]
 pub struct nsTArray_CopyChooser;
+impl ::std::clone::Clone for nsTArray_CopyChooser {
+    fn clone(&self) -> Self { *self }
+}
 #[repr(C)]
 pub struct nsStyleSVGReset {
     pub mMask: nsStyleImageLayers,
     pub mClipPath: nsStyleClipPath,
     pub mFilters: u64,
     pub mStopColor: nscolor,
     pub mFloodColor: nscolor,
     pub mLightingColor: nscolor,
--- a/servo/ports/geckolib/tools/regen_style_structs.sh
+++ b/servo/ports/geckolib/tools/regen_style_structs.sh
@@ -123,8 +123,18 @@ fi
   -opaque-type "CounterStyleManager"                                \
   -opaque-type "ImageValue"                                         \
   -opaque-type "URLValue"                                           \
   -opaque-type "nsIPrincipal"                                       \
   -opaque-type "nsDataHashtable"                                    \
   -opaque-type "imgIRequest"                                        \
   -include "$1/mozilla-config.h"                                    \
   "$DIST_INCLUDE/nsStyleStruct.h"
+
+if [ $? -ne 0 ]; then
+  echo -e "\e[91warning:\e[0m bindgen exited with nonzero exit status"
+else
+  echo -e "\e[34minfo:\e[0m bindgen exited successfully, running tests"
+  TESTS_FILE=$(mktemp)
+  rustc ../gecko_style_structs.rs --test -o $TESTS_FILE
+  $TESTS_FILE
+  rm $TESTS_FILE
+fi