diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-03-09 22:04:00 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-03-13 00:03:10 +0100 |
| commit | 48757a70a382afe27d5469fdcfbe5d434c9d4097 (patch) | |
| tree | 9751b38d6c6e5a788aa9608a138db69f4e410d75 /src | |
| parent | 7c19e1eed5418b8c02be65d678417b241ee01a3e (diff) | |
| download | rust-48757a70a382afe27d5469fdcfbe5d434c9d4097.tar.gz rust-48757a70a382afe27d5469fdcfbe5d434c9d4097.zip | |
Fix newtype_index
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_data_structures/indexed_vec.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index 1153c3e79bf..359b89f683d 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -286,13 +286,15 @@ macro_rules! newtype_index { ); // Append comma to end of derives list if it's missing - (@type [$type:ident] + (@attrs [$(#[$attrs:meta])*] + @type [$type:ident] @max [$max:expr] @vis [$v:vis] @debug_format [$debug_format:tt] derive [$($derives:ident),*] $($tokens:tt)*) => ( newtype_index!( + @attrs [$(#[$attrs])*] @type [$type] @max [$max] @vis [$v] @@ -303,7 +305,8 @@ macro_rules! newtype_index { // By not including the @derives marker in this list nor in the default args, we can force it // to come first if it exists. When encodable is custom, just use the derives list as-is. - (@type [$type:ident] + (@attrs [$(#[$attrs:meta])*] + @type [$type:ident] @max [$max:expr] @vis [$v:vis] @debug_format [$debug_format:tt] @@ -311,6 +314,7 @@ macro_rules! newtype_index { ENCODABLE = custom $($tokens:tt)*) => ( newtype_index!( + @attrs [$(#[$attrs])*] @derives [$($derives,)+] @type [$type] @max [$max] |
