]> git.lizzy.rs Git - enumset.git/commitdiff
Fix enum_set! macro giving an unneeded warning for a single value.
authorAlissa Rao <lymia@lymiahugs.com>
Sat, 27 Feb 2021 20:35:44 +0000 (12:35 -0800)
committerAlissa Rao <lymia@lymiahugs.com>
Sat, 27 Feb 2021 20:35:44 +0000 (12:35 -0800)
enumset/src/lib.rs

index 66af9e316ec26c6aa36eefd3f13ce349f7029fb6..a3f5eab6420baf0951cac4eee6ae1608274794d3 100644 (file)
@@ -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)|* $(|)*) => {
         {