From: Alissa Rao Date: Sat, 27 Feb 2021 20:35:44 +0000 (-0800) Subject: Fix enum_set! macro giving an unneeded warning for a single value. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9e669242a0d91463f2b76b918bb319608a7c9840;p=enumset.git Fix enum_set! macro giving an unneeded warning for a single value. --- 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)|* $(|)*) => { {