File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/librustc_data_structures Expand file tree Collapse file tree 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 {
286286 ) ;
287287
288288 // Append comma to end of derives list if it's missing
289- ( @type [ $type: ident]
289+ ( @attrs [ $( #[ $attrs: meta] ) * ]
290+ @type [ $type: ident]
290291 @max [ $max: expr]
291292 @vis [ $v: vis]
292293 @debug_format [ $debug_format: tt]
293294 derive [ $( $derives: ident) ,* ]
294295 $( $tokens: tt) * ) => (
295296 newtype_index!(
297+ @attrs [ $( #[ $attrs] ) * ]
296298 @type [ $type]
297299 @max [ $max]
298300 @vis [ $v]
@@ -303,14 +305,16 @@ macro_rules! newtype_index {
303305
304306 // By not including the @derives marker in this list nor in the default args, we can force it
305307 // 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]
307310 @max [ $max: expr]
308311 @vis [ $v: vis]
309312 @debug_format [ $debug_format: tt]
310313 derive [ $( $derives: ident, ) +]
311314 ENCODABLE = custom
312315 $( $tokens: tt) * ) => (
313316 newtype_index!(
317+ @attrs [ $( #[ $attrs] ) * ]
314318 @derives [ $( $derives, ) +]
315319 @type [ $type]
316320 @max [ $max]
You can’t perform that action at this time.
0 commit comments