Skip to content

Commit ec117c0

Browse files
committed
Rename $passes as $pass in several macros.
Because it makes more sense that way.
1 parent ac1e69c commit ec117c0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

compiler/rustc_lint/src/passes.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ impl LateLintPass<'_> for HardwiredLints {}
8181

8282
#[macro_export]
8383
macro_rules! expand_combined_late_lint_pass_method {
84-
([$($passes:ident),*], $self: ident, $name: ident, $params:tt) => ({
85-
$($self.$passes.$name $params;)*
84+
([$($pass:ident),*], $self: ident, $name: ident, $params:tt) => ({
85+
$($self.$pass.$name $params;)*
8686
})
8787
}
8888

@@ -97,28 +97,28 @@ macro_rules! expand_combined_late_lint_pass_methods {
9797

9898
#[macro_export]
9999
macro_rules! declare_combined_late_lint_pass {
100-
([$v:vis $name:ident, [$($passes:ident: $constructor:expr,)*]], $methods:tt) => (
100+
([$v:vis $name:ident, [$($pass:ident: $constructor:expr,)*]], $methods:tt) => (
101101
#[allow(non_snake_case)]
102102
$v struct $name {
103-
$($passes: $passes,)*
103+
$($pass: $pass,)*
104104
}
105105

106106
impl $name {
107107
$v fn new() -> Self {
108108
Self {
109-
$($passes: $constructor,)*
109+
$($pass: $constructor,)*
110110
}
111111
}
112112

113113
$v fn get_lints() -> LintArray {
114114
let mut lints = Vec::new();
115-
$(lints.extend_from_slice(&$passes::get_lints());)*
115+
$(lints.extend_from_slice(&$pass::get_lints());)*
116116
lints
117117
}
118118
}
119119

120120
impl<'tcx> LateLintPass<'tcx> for $name {
121-
expand_combined_late_lint_pass_methods!([$($passes),*], $methods);
121+
expand_combined_late_lint_pass_methods!([$($pass),*], $methods);
122122
}
123123

124124
#[allow(rustc::lint_pass_impl_without_macro)]
@@ -184,8 +184,8 @@ early_lint_methods!(declare_early_lint_pass, []);
184184

185185
#[macro_export]
186186
macro_rules! expand_combined_early_lint_pass_method {
187-
([$($passes:ident),*], $self: ident, $name: ident, $params:tt) => ({
188-
$($self.$passes.$name $params;)*
187+
([$($pass:ident),*], $self: ident, $name: ident, $params:tt) => ({
188+
$($self.$pass.$name $params;)*
189189
})
190190
}
191191

@@ -200,28 +200,28 @@ macro_rules! expand_combined_early_lint_pass_methods {
200200

201201
#[macro_export]
202202
macro_rules! declare_combined_early_lint_pass {
203-
([$v:vis $name:ident, [$($passes:ident: $constructor:expr,)*]], $methods:tt) => (
203+
([$v:vis $name:ident, [$($pass:ident: $constructor:expr,)*]], $methods:tt) => (
204204
#[allow(non_snake_case)]
205205
$v struct $name {
206-
$($passes: $passes,)*
206+
$($pass: $pass,)*
207207
}
208208

209209
impl $name {
210210
$v fn new() -> Self {
211211
Self {
212-
$($passes: $constructor,)*
212+
$($pass: $constructor,)*
213213
}
214214
}
215215

216216
$v fn get_lints() -> LintArray {
217217
let mut lints = Vec::new();
218-
$(lints.extend_from_slice(&$passes::get_lints());)*
218+
$(lints.extend_from_slice(&$pass::get_lints());)*
219219
lints
220220
}
221221
}
222222

223223
impl EarlyLintPass for $name {
224-
expand_combined_early_lint_pass_methods!([$($passes),*], $methods);
224+
expand_combined_early_lint_pass_methods!([$($pass),*], $methods);
225225
}
226226

227227
#[allow(rustc::lint_pass_impl_without_macro)]

0 commit comments

Comments
 (0)