Commit 3f00fd2
committed
check redundant prelude imports
detects unnecessary imports in std::prelude that can be eliminated.
For example import:
```rust
use std::{option::{Iter, IterMut, IntoIter, Option::{self, Some}}, convert::{TryFrom, TryInto}, mem::drop};
```
delete : `Option::{self, Some}` and `mem::drop`1 parent f440b5f commit 3f00fd2
File tree
96 files changed
+229
-205
lines changed- compiler/rustc_resolve/src
- library
- core/src
- array
- char
- convert
- future
- iter/adapters
- mem
- ops
- ptr
- slice
- task
- std/src
- io/error
- src/tools/rust-analyzer/crates/stdx/src
- tests/ui
- box
- unit
- coherence
- consts
- coroutine
- extern
- for-loop-while
- issues
- lint
- unused
- use-redundant
- moves
- overloaded
- regions
- rust-2018
- specialization
- stdlib-unit-tests
- structs-enums
- suggestions
- traits
- inheritance
- negative-impls
- wf-object
- ufcs
- unboxed-closures
- zero-sized
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
96 files changed
+229
-205
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
| 1228 | + | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
185 | 205 | | |
186 | 206 | | |
187 | 207 | | |
| |||
286 | 306 | | |
287 | 307 | | |
288 | 308 | | |
289 | | - | |
| 309 | + | |
290 | 310 | | |
291 | 311 | | |
292 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
| 1485 | + | |
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
512 | 513 | | |
513 | 514 | | |
514 | 515 | | |
| |||
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
| 583 | + | |
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
| |||
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
| 759 | + | |
757 | 760 | | |
758 | 761 | | |
759 | 762 | | |
| |||
766 | 769 | | |
767 | 770 | | |
768 | 771 | | |
| 772 | + | |
769 | 773 | | |
770 | 774 | | |
771 | 775 | | |
| |||
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
| 782 | + | |
778 | 783 | | |
779 | 784 | | |
780 | 785 | | |
| |||
793 | 798 | | |
794 | 799 | | |
795 | 800 | | |
| 801 | + | |
796 | 802 | | |
797 | 803 | | |
798 | 804 | | |
| |||
849 | 855 | | |
850 | 856 | | |
851 | 857 | | |
852 | | - | |
853 | 858 | | |
854 | 859 | | |
855 | 860 | | |
856 | 861 | | |
857 | 862 | | |
858 | 863 | | |
859 | 864 | | |
860 | | - | |
861 | 865 | | |
862 | 866 | | |
863 | 867 | | |
| |||
901 | 905 | | |
902 | 906 | | |
903 | 907 | | |
904 | | - | |
905 | | - | |
| 908 | + | |
906 | 909 | | |
907 | 910 | | |
908 | 911 | | |
| |||
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
| 929 | + | |
926 | 930 | | |
927 | 931 | | |
928 | 932 | | |
| |||
1029 | 1033 | | |
1030 | 1034 | | |
1031 | 1035 | | |
| 1036 | + | |
1032 | 1037 | | |
1033 | 1038 | | |
1034 | 1039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1048 | 1049 | | |
1049 | 1050 | | |
1050 | 1051 | | |
| |||
1291 | 1292 | | |
1292 | 1293 | | |
1293 | 1294 | | |
1294 | | - | |
1295 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1296 | 1299 | | |
1297 | 1300 | | |
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
1301 | | - | |
| 1304 | + | |
1302 | 1305 | | |
1303 | 1306 | | |
1304 | 1307 | | |
| |||
1313 | 1316 | | |
1314 | 1317 | | |
1315 | 1318 | | |
1316 | | - | |
1317 | 1319 | | |
1318 | 1320 | | |
1319 | | - | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1320 | 1326 | | |
1321 | 1327 | | |
1322 | | - | |
1323 | 1328 | | |
1324 | 1329 | | |
1325 | 1330 | | |
| |||
1348 | 1353 | | |
1349 | 1354 | | |
1350 | 1355 | | |
1351 | | - | |
1352 | 1356 | | |
1353 | 1357 | | |
1354 | 1358 | | |
| |||
1372 | 1376 | | |
1373 | 1377 | | |
1374 | 1378 | | |
1375 | | - | |
1376 | 1379 | | |
1377 | 1380 | | |
1378 | 1381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
3482 | 3482 | | |
3483 | 3483 | | |
3484 | 3484 | | |
3485 | | - | |
| 3485 | + | |
3486 | 3486 | | |
3487 | 3487 | | |
3488 | 3488 | | |
| |||
3497 | 3497 | | |
3498 | 3498 | | |
3499 | 3499 | | |
3500 | | - | |
| 3500 | + | |
3501 | 3501 | | |
3502 | 3502 | | |
3503 | 3503 | | |
| |||
0 commit comments