From 70d9281cac20e0686d527c973938c14e4077a55b Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Fri, 18 Mar 2022 15:29:54 +0900 Subject: libbinder_rs: allow attributes for enumerators declare_binder_enum macro now allows attributes for enumerators so that an enumerator can be deprecated. Bug: 218401941 Test: aidl_integration_test Change-Id: If34fd88db3bee498a65d2d66eae14caa8583d0cf --- libs/binder/rust/src/binder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/binder/rust/src/binder.rs b/libs/binder/rust/src/binder.rs index 467e51e276..5d6206de0b 100644 --- a/libs/binder/rust/src/binder.rs +++ b/libs/binder/rust/src/binder.rs @@ -1086,7 +1086,7 @@ macro_rules! declare_binder_enum { { $( #[$attr:meta] )* $enum:ident : [$backing:ty; $size:expr] { - $( $name:ident = $value:expr, )* + $( $( #[$value_attr:meta] )* $name:ident = $value:expr, )* } } => { $( #[$attr] )* @@ -1094,7 +1094,7 @@ macro_rules! declare_binder_enum { #[allow(missing_docs)] pub struct $enum(pub $backing); impl $enum { - $( #[allow(missing_docs)] pub const $name: Self = Self($value); )* + $( $( #[$value_attr] )* #[allow(missing_docs)] pub const $name: Self = Self($value); )* #[inline(always)] #[allow(missing_docs)] -- cgit v1.2.3-59-g8ed1b