File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ macro_rules! quote_inner {
101
101
quote_inner!( $ts $( $tail) * ) ;
102
102
} ;
103
103
104
+ // Attribute
105
+ ( $ts: ident #[ $( $inner: tt) * ] $( $tail: tt) * ) => {
106
+ $ts. extend( [
107
+ :: proc_macro:: TokenTree :: from(
108
+ :: proc_macro:: Punct :: new( '#' , :: proc_macro:: Spacing :: Alone )
109
+ ) ,
110
+ :: proc_macro:: TokenTree :: Group ( :: proc_macro:: Group :: new(
111
+ :: proc_macro:: Delimiter :: Bracket ,
112
+ quote!( $( $inner) * )
113
+ ) ) ,
114
+ ] ) ;
115
+ quote_inner!( $ts $( $tail) * ) ;
116
+ } ;
117
+
104
118
// Groups
105
119
( $ts: ident ( $( $inner: tt) * ) $( $tail: tt) * ) => {
106
120
$ts. extend( [ :: proc_macro:: TokenTree :: Group ( :: proc_macro:: Group :: new(
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ pub(crate) fn build(
103
103
104
104
let serialize_option = if cfg ! ( feature = "formatting" ) {
105
105
quote ! {
106
+ #[ allow( clippy:: ref_option) ]
106
107
pub fn serialize<S : :: serde:: Serializer >(
107
108
option: & Option <__TimeSerdeType>,
108
109
serializer: S ,
You can’t perform that action at this time.
0 commit comments