From 9e669242a0d91463f2b76b918bb319608a7c9840 Mon Sep 17 00:00:00 2001 From: Alissa Rao Date: Sat, 27 Feb 2021 12:35:44 -0800 Subject: [PATCH] Fix enum_set! macro giving an unneeded warning for a single value. --- enumset/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/enumset/src/lib.rs b/enumset/src/lib.rs index 66af9e3..a3f5eab 100644 --- a/enumset/src/lib.rs +++ b/enumset/src/lib.rs @@ -673,7 +673,10 @@ macro_rules! enum_set { $crate::EnumSet { __priv_repr: 0 } }; ($value:path $(|)*) => { - $value.__impl_enumset_internal__const_only() + { + #[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only(); + value + } }; ($value:path | $($rest:path)|* $(|)*) => { { -- 2.44.0