]> git.proxmox.com Git - rustc.git/blobdiff - vendor/serde_derive/src/lib.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / vendor / serde_derive / src / lib.rs
index 266bc9dedb008d47fc4a526bdd5bdf56138f402f..f4a93ae1ac7c1e42c351802254063f3331d074f3 100644 (file)
@@ -13,7 +13,7 @@
 //!
 //! [https://serde.rs/derive.html]: https://serde.rs/derive.html
 
-#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.118")]
+#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.123")]
 #![allow(unknown_lints, bare_trait_objects)]
 #![deny(clippy::all, clippy::pedantic)]
 // Ignored clippy lints
@@ -48,6 +48,7 @@
     clippy::struct_excessive_bools,
     clippy::too_many_lines,
     clippy::unseparated_literal_suffix,
+    clippy::unused_self,
     clippy::use_self,
     clippy::wildcard_imports
 )]
@@ -78,16 +79,16 @@ mod try;
 
 #[proc_macro_derive(Serialize, attributes(serde))]
 pub fn derive_serialize(input: TokenStream) -> TokenStream {
-    let input = parse_macro_input!(input as DeriveInput);
-    ser::expand_derive_serialize(&input)
+    let mut input = parse_macro_input!(input as DeriveInput);
+    ser::expand_derive_serialize(&mut input)
         .unwrap_or_else(to_compile_errors)
         .into()
 }
 
 #[proc_macro_derive(Deserialize, attributes(serde))]
 pub fn derive_deserialize(input: TokenStream) -> TokenStream {
-    let input = parse_macro_input!(input as DeriveInput);
-    de::expand_derive_deserialize(&input)
+    let mut input = parse_macro_input!(input as DeriveInput);
+    de::expand_derive_deserialize(&mut input)
         .unwrap_or_else(to_compile_errors)
         .into()
 }