From dafff9d4f20aceb566e8fdef0bce5ec776c412c3 Mon Sep 17 00:00:00 2001 From: Jonathan Chan Kwan Yin Date: Fri, 24 Sep 2021 23:16:03 +0800 Subject: [PATCH 1/3] Fixed incorrectly commented `deprecated` attribute --- strum/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strum/src/lib.rs b/strum/src/lib.rs index ed50ea70..8cc2b4ae 100644 --- a/strum/src/lib.rs +++ b/strum/src/lib.rs @@ -168,7 +168,7 @@ pub trait EnumProperty { /// A cheap reference-to-reference conversion. Used to convert a value to a /// reference value with `'static` lifetime within generic code. -/// #[deprecated(since="0.13.0", note="please use `#[derive(IntoStaticStr)]` instead")] +#[deprecated(since="0.13.0", note="please use `#[derive(IntoStaticStr)]` instead")] pub trait AsStaticRef where T: ?Sized, From 8060fa4540cd9b1aa6b7b4e00731d607e956fa89 Mon Sep 17 00:00:00 2001 From: SOFe Date: Sun, 3 Oct 2021 14:34:39 +0800 Subject: [PATCH 2/3] Also deprecate the `AsStaticRef` macro. --- strum_macros/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/strum_macros/src/lib.rs b/strum_macros/src/lib.rs index a6009a25..457ba9bd 100644 --- a/strum_macros/src/lib.rs +++ b/strum_macros/src/lib.rs @@ -191,6 +191,7 @@ pub fn variant_names(input: proc_macro::TokenStream) -> proc_macro::TokenStream } #[proc_macro_derive(AsStaticStr, attributes(strum))] +#[deprecated(since="0.13.0", note="please use `#[derive(IntoStaticStr)]` instead")] pub fn as_static_str(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let ast = syn::parse_macro_input!(input as DeriveInput); From ebeb9593a5150c496aff9615ce10086ad275d1e3 Mon Sep 17 00:00:00 2001 From: SOFe Date: Mon, 4 Oct 2021 21:25:37 +0800 Subject: [PATCH 3/3] Changed deprecation version to 0.22.0 --- strum/src/lib.rs | 2 +- strum_macros/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strum/src/lib.rs b/strum/src/lib.rs index 8cc2b4ae..18a8af7e 100644 --- a/strum/src/lib.rs +++ b/strum/src/lib.rs @@ -168,7 +168,7 @@ pub trait EnumProperty { /// A cheap reference-to-reference conversion. Used to convert a value to a /// reference value with `'static` lifetime within generic code. -#[deprecated(since="0.13.0", note="please use `#[derive(IntoStaticStr)]` instead")] +#[deprecated(since="0.22.0", note="please use `#[derive(IntoStaticStr)]` instead")] pub trait AsStaticRef where T: ?Sized, diff --git a/strum_macros/src/lib.rs b/strum_macros/src/lib.rs index 457ba9bd..b49da1e6 100644 --- a/strum_macros/src/lib.rs +++ b/strum_macros/src/lib.rs @@ -191,7 +191,7 @@ pub fn variant_names(input: proc_macro::TokenStream) -> proc_macro::TokenStream } #[proc_macro_derive(AsStaticStr, attributes(strum))] -#[deprecated(since="0.13.0", note="please use `#[derive(IntoStaticStr)]` instead")] +#[deprecated(since="0.22.0", note="please use `#[derive(IntoStaticStr)]` instead")] pub fn as_static_str(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let ast = syn::parse_macro_input!(input as DeriveInput);