Commit 48757a7 1 parent 7c19e1e commit 48757a7 Copy full SHA for 48757a7
File tree 1 file changed +6
-2
lines changed
src/librustc_data_structures
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -286,13 +286,15 @@ macro_rules! newtype_index {
286
286
) ;
287
287
288
288
// Append comma to end of derives list if it's missing
289
- ( @type [ $type: ident]
289
+ ( @attrs [ $( #[ $attrs: meta] ) * ]
290
+ @type [ $type: ident]
290
291
@max [ $max: expr]
291
292
@vis [ $v: vis]
292
293
@debug_format [ $debug_format: tt]
293
294
derive [ $( $derives: ident) ,* ]
294
295
$( $tokens: tt) * ) => (
295
296
newtype_index!(
297
+ @attrs [ $( #[ $attrs] ) * ]
296
298
@type [ $type]
297
299
@max [ $max]
298
300
@vis [ $v]
@@ -303,14 +305,16 @@ macro_rules! newtype_index {
303
305
304
306
// By not including the @derives marker in this list nor in the default args, we can force it
305
307
// to come first if it exists. When encodable is custom, just use the derives list as-is.
306
- ( @type [ $type: ident]
308
+ ( @attrs [ $( #[ $attrs: meta] ) * ]
309
+ @type [ $type: ident]
307
310
@max [ $max: expr]
308
311
@vis [ $v: vis]
309
312
@debug_format [ $debug_format: tt]
310
313
derive [ $( $derives: ident, ) +]
311
314
ENCODABLE = custom
312
315
$( $tokens: tt) * ) => (
313
316
newtype_index!(
317
+ @attrs [ $( #[ $attrs] ) * ]
314
318
@derives [ $( $derives, ) +]
315
319
@type [ $type]
316
320
@max [ $max]
You can’t perform that action at this time.
0 commit comments