Skip to content

Commit 97fe353

Browse files
committed
Split lines longer than 100 columns
1 parent 9423bee commit 97fe353

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/librustc_data_structures/indexed_vec.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,32 @@ macro_rules! newtype_index {
8585
);
8686

8787
// Rewrite final without comma to one that includes comma
88-
(@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] $name:ident = $constant:expr) => (
88+
(@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr]
89+
$name:ident = $constant:expr) => (
8990
newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $name = $constant,);
9091
);
9192

9293
// Rewrite final const without comma to one that includes comma
93-
(@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] const $name:ident = $constant:expr) => (
94+
(@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr]
95+
const $name:ident = $constant:expr) => (
9496
newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] const $name = $constant,);
9597
);
9698

9799
// Replace existing default for max
98-
(@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr] MAX = $max:expr, $($tokens:tt)*) => (
100+
(@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr]
101+
MAX = $max:expr, $($tokens:tt)*) => (
99102
newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $(tokens)*);
100103
);
101104

102105
// Replace existing default for debug_name
103-
(@type[$type:ident] @max[$max:expr] @debug_name[$_debug_name:expr] DEBUG_NAME = $debug_name:expr, $($tokens:tt)*) => (
106+
(@type[$type:ident] @max[$max:expr] @debug_name[$_debug_name:expr]
107+
DEBUG_NAME = $debug_name:expr, $($tokens:tt)*) => (
104108
newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $($tokens)*);
105109
);
106110

107111
// Assign a user-defined constant (as final param)
108-
(@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr] const $name:ident = $constant:expr, $($tokens:tt)*) => (
112+
(@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr]
113+
const $name:ident = $constant:expr, $($tokens:tt)*) => (
109114
pub const $name: $type = $type($constant);
110115
newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $($tokens)*);
111116
);

0 commit comments

Comments
 (0)