This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit de26fb5
committed
Remove useless
`FmtVisitor::visit_mac` has an `Option<Ident>` arg which is always
either `None` or `Some(kw::Empty)`, because `ItemKind::MacCall` always
has an empty ident. This value is passed through various functions until
it reaches `rewrite_macro_name`, which treats `None` and
`Some(kw::Empty)` the same.
In other words, the argument is useless. This commit removes it. There
is no change in behaviour. The commit also changes a few `symbol::Ident`
occurrences to `Ident` in `macros.rs`; `Symbol` is imported in that file
so `Ident` might as well be, too.Option<Ident> arg.1 parent 88b720b commit de26fb5
File tree
6 files changed
+16
-38
lines changed- src/tools/rustfmt/src
6 files changed
+16
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3502 | 3502 | | |
3503 | 3503 | | |
3504 | 3504 | | |
3505 | | - | |
| 3505 | + | |
3506 | 3506 | | |
3507 | 3507 | | |
3508 | 3508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
| |||
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
| 60 | + | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
| |||
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 103 | + | |
| 104 | + | |
112 | 105 | | |
113 | 106 | | |
114 | 107 | | |
115 | 108 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 109 | | |
121 | 110 | | |
122 | 111 | | |
| |||
165 | 154 | | |
166 | 155 | | |
167 | 156 | | |
168 | | - | |
169 | 157 | | |
170 | 158 | | |
171 | 159 | | |
| |||
179 | 167 | | |
180 | 168 | | |
181 | 169 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 170 | + | |
190 | 171 | | |
191 | 172 | | |
192 | 173 | | |
| |||
207 | 188 | | |
208 | 189 | | |
209 | 190 | | |
210 | | - | |
211 | 191 | | |
212 | 192 | | |
213 | 193 | | |
| |||
222 | 202 | | |
223 | 203 | | |
224 | 204 | | |
225 | | - | |
| 205 | + | |
226 | 206 | | |
227 | 207 | | |
228 | 208 | | |
| |||
433 | 413 | | |
434 | 414 | | |
435 | 415 | | |
436 | | - | |
| 416 | + | |
437 | 417 | | |
438 | 418 | | |
439 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 310 | + | |
313 | 311 | | |
314 | 312 | | |
315 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
1021 | | - | |
| 1021 | + | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | 1024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
| 689 | + | |
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
0 commit comments