diff --git a/crates/ruma-macros/src/serde/deserialize_from_cow_str.rs b/crates/ruma-macros/src/serde/deserialize_from_cow_str.rs index 7c784826..7784b199 100644 --- a/crates/ruma-macros/src/serde/deserialize_from_cow_str.rs +++ b/crates/ruma-macros/src/serde/deserialize_from_cow_str.rs @@ -8,6 +8,7 @@ pub fn expand_deserialize_from_cow_str(ident: &Ident) -> syn::Result #ruma_common::exports::serde::de::Deserialize<'de> for #ident { fn deserialize(deserializer: D) -> ::std::result::Result where diff --git a/crates/ruma-macros/src/serde/display_as_ref_str.rs b/crates/ruma-macros/src/serde/display_as_ref_str.rs index e521c183..fb5cfe76 100644 --- a/crates/ruma-macros/src/serde/display_as_ref_str.rs +++ b/crates/ruma-macros/src/serde/display_as_ref_str.rs @@ -4,6 +4,7 @@ use quote::quote; pub fn expand_display_as_ref_str(ident: &Ident) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::fmt::Display for #ident { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { f.write_str(::std::convert::AsRef::<::std::primitive::str>::as_ref(self)) diff --git a/crates/ruma-macros/src/serde/enum_as_ref_str.rs b/crates/ruma-macros/src/serde/enum_as_ref_str.rs index 801c6499..67e992bc 100644 --- a/crates/ruma-macros/src/serde/enum_as_ref_str.rs +++ b/crates/ruma-macros/src/serde/enum_as_ref_str.rs @@ -50,6 +50,7 @@ pub fn expand_enum_as_ref_str(input: &ItemEnum) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::convert::AsRef<::std::primitive::str> for #enum_name { fn as_ref(&self) -> &::std::primitive::str { match self { #(#branches),* } diff --git a/crates/ruma-macros/src/serde/enum_from_string.rs b/crates/ruma-macros/src/serde/enum_from_string.rs index 2b5fdbbb..b396da0b 100644 --- a/crates/ruma-macros/src/serde/enum_from_string.rs +++ b/crates/ruma-macros/src/serde/enum_from_string.rs @@ -69,6 +69,7 @@ pub fn expand_enum_from_string(input: &ItemEnum) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::convert::From for #enum_name where T: ::std::convert::AsRef<::std::primitive::str> diff --git a/crates/ruma-macros/src/serde/eq_as_ref_str.rs b/crates/ruma-macros/src/serde/eq_as_ref_str.rs index 846a9807..dc5ac033 100644 --- a/crates/ruma-macros/src/serde/eq_as_ref_str.rs +++ b/crates/ruma-macros/src/serde/eq_as_ref_str.rs @@ -4,6 +4,7 @@ use quote::quote; pub fn expand_partial_eq_as_ref_str(ident: &Ident) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::cmp::PartialEq for #ident { fn eq(&self, other: &Self) -> bool { let other = ::std::convert::AsRef::<::std::primitive::str>::as_ref(other); diff --git a/crates/ruma-macros/src/serde/ord_as_ref_str.rs b/crates/ruma-macros/src/serde/ord_as_ref_str.rs index 070a7a82..a0188db3 100644 --- a/crates/ruma-macros/src/serde/ord_as_ref_str.rs +++ b/crates/ruma-macros/src/serde/ord_as_ref_str.rs @@ -4,6 +4,7 @@ use quote::quote; pub fn expand_partial_ord_as_ref_str(ident: &Ident) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::cmp::PartialOrd for #ident { fn partial_cmp(&self, other: &Self) -> ::std::option::Option<::std::cmp::Ordering> { let other = ::std::convert::AsRef::<::std::primitive::str>::as_ref(other); @@ -16,6 +17,7 @@ pub fn expand_partial_ord_as_ref_str(ident: &Ident) -> syn::Result pub fn expand_ord_as_ref_str(ident: &Ident) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl ::std::cmp::Ord for #ident { fn cmp(&self, other: &Self) -> ::std::cmp::Ordering { let other = ::std::convert::AsRef::<::std::primitive::str>::as_ref(other); diff --git a/crates/ruma-macros/src/serde/serialize_as_ref_str.rs b/crates/ruma-macros/src/serde/serialize_as_ref_str.rs index c2c823ee..b8683e4b 100644 --- a/crates/ruma-macros/src/serde/serialize_as_ref_str.rs +++ b/crates/ruma-macros/src/serde/serialize_as_ref_str.rs @@ -8,6 +8,7 @@ pub fn expand_serialize_as_ref_str(ident: &Ident) -> syn::Result { Ok(quote! { #[automatically_derived] + #[allow(deprecated)] impl #ruma_common::exports::serde::ser::Serialize for #ident { fn serialize(&self, serializer: S) -> ::std::result::Result where