summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-03-19 02:54:14 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-03-19 02:54:14 +0000
commit68b7cdca84ebe4e104d04ae4c245396e6affe681 (patch)
tree9310039cd33c703dac96d0fd0d57a7216559aad3
parent3365990b60c127f688d0222330010155d9afcc0a (diff)
parent77078f73af8981e4c21a4cba80744c840cf8dd90 (diff)
Merge "libbinder_rs: allow attributes for enumerators" am: 77078f73af
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2031663 Change-Id: I8bf04411aacad9e00989a159c5810634137f84dc
-rw-r--r--libs/binder/rust/src/binder.rs4
1 files 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)]