diff options
| author | Paul Faria <Nashenas88@gmail.com> | 2017-10-11 20:06:24 -0400 |
|---|---|---|
| committer | Paul Faria <Nashenas88@gmail.com> | 2017-10-11 20:06:24 -0400 |
| commit | 97fe353ce65c67401ef3a9ce2b90a216d982daba (patch) | |
| tree | 35b01b2b36d401d52326be437668ba48b3f5afd3 /src/librustc_data_structures/indexed_vec.rs | |
| parent | 9423bee6d306195f8905cb4d594c047144e6d701 (diff) | |
| download | rust-97fe353ce65c67401ef3a9ce2b90a216d982daba.tar.gz rust-97fe353ce65c67401ef3a9ce2b90a216d982daba.zip | |
Split lines longer than 100 columns
Diffstat (limited to 'src/librustc_data_structures/indexed_vec.rs')
| -rw-r--r-- | src/librustc_data_structures/indexed_vec.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index c10f7372a8d..6c5a37aa1e5 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -85,27 +85,32 @@ macro_rules! newtype_index { ); // Rewrite final without comma to one that includes comma - (@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] $name:ident = $constant:expr) => ( + (@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] + $name:ident = $constant:expr) => ( newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $name = $constant,); ); // Rewrite final const without comma to one that includes comma - (@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] const $name:ident = $constant:expr) => ( + (@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] + const $name:ident = $constant:expr) => ( newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] const $name = $constant,); ); // Replace existing default for max - (@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] MAX = $max:expr, $($tokens:tt)*) => ( + (@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] + MAX = $max:expr, $($tokens:tt)*) => ( newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $(tokens)*); ); // Replace existing default for debug_name - (@type[$type:ident] @max[$max:expr] @debug_name[$_debug_name:expr] DEBUG_NAME = $debug_name:expr, $($tokens:tt)*) => ( + (@type[$type:ident] @max[$max:expr] @debug_name[$_debug_name:expr] + DEBUG_NAME = $debug_name:expr, $($tokens:tt)*) => ( newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $($tokens)*); ); // Assign a user-defined constant (as final param) - (@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] const $name:ident = $constant:expr, $($tokens:tt)*) => ( + (@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] + const $name:ident = $constant:expr, $($tokens:tt)*) => ( pub const $name: $type = $type($constant); newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $($tokens)*); ); |
