This repository was archived by the owner on May 28, 2025. It is now read-only.
forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit 9543f8e
Auto merge of rust-lang#129249 - estebank:useless-into, r=<try>
[Experimental] `<T as Into<T>>::into` lint
Running crater to see how common that pattern is. The Lint would have to be at most warn-by-default because there are a handful of cases detected that are actually perfectly reasonable (`type` aliases with per-platform `cfg`, or macros) which are now at best half-heartedly handled.
I've detected a handful of cases where we're calling `.into()` unnecessarily in the `rustc` codebase as well, and changed those.
CC rust-lang#127343.File tree
19 files changed
+220
-15
lines changed- compiler
- rustc_lint
- src
- rustc_span/src
- library
- core/src/convert
- std/src
- os/fd
- sys_common
- sys/pal/unix/process
- src/tools/clippy/tests/ui
- tests
- rustdoc-ui
- error-in-impl-trait
- issues
- ui
- deriving/auxiliary
- macros
19 files changed
+220
-15
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
740 | 740 |
| |
741 | 741 |
| |
742 | 742 |
| |
743 | + | ||
744 | + | ||
743 | 745 |
| |
744 | 746 |
| |
745 | 747 |
| |
|
Lines changed: 115 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 | - | ||
61 | + | ||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
| |||
1588 | 1588 |
| |
1589 | 1589 |
| |
1590 | 1590 |
| |
1591 | + | ||
1591 | 1592 |
| |
1592 | 1593 |
| |
1593 | 1594 |
| |
| |||
3062 | 3063 |
| |
3063 | 3064 |
| |
3064 | 3065 |
| |
3066 | + | ||
3067 | + | ||
3068 | + | ||
3069 | + | ||
3070 | + | ||
3071 | + | ||
3072 | + | ||
3073 | + | ||
3074 | + | ||
3075 | + | ||
3076 | + | ||
3077 | + | ||
3078 | + | ||
3079 | + | ||
3080 | + | ||
3081 | + | ||
3082 | + | ||
3083 | + | ||
3084 | + | ||
3085 | + | ||
3086 | + | ||
3087 | + | ||
3088 | + | ||
3089 | + | ||
3090 | + | ||
3091 | + | ||
3092 | + | ||
3093 | + | ||
3094 | + | ||
3095 | + | ||
3096 | + | ||
3097 | + | ||
3098 | + | ||
3099 | + | ||
3100 | + | ||
3101 | + | ||
3102 | + | ||
3103 | + | ||
3104 | + | ||
3105 | + | ||
3106 | + | ||
3107 | + | ||
3108 | + | ||
3109 | + | ||
3110 | + | ||
3111 | + | ||
3112 | + | ||
3113 | + | ||
3114 | + | ||
3115 | + | ||
3116 | + | ||
3117 | + | ||
3118 | + | ||
3119 | + | ||
3120 | + | ||
3121 | + | ||
3122 | + | ||
3123 | + | ||
3124 | + | ||
3125 | + | ||
3126 | + | ||
3127 | + | ||
3128 | + | ||
3129 | + | ||
3130 | + | ||
3131 | + | ||
3132 | + | ||
3133 | + | ||
3134 | + | ||
3135 | + | ||
3136 | + | ||
3137 | + | ||
3138 | + | ||
3139 | + | ||
3140 | + | ||
3141 | + | ||
3142 | + | ||
3143 | + | ||
3144 | + | ||
3145 | + | ||
3146 | + | ||
3147 | + | ||
3148 | + | ||
3149 | + | ||
3150 | + | ||
3151 | + | ||
3152 | + | ||
3153 | + | ||
3154 | + | ||
3155 | + | ||
3156 | + | ||
3157 | + | ||
3158 | + | ||
3159 | + | ||
3160 | + | ||
3161 | + | ||
3162 | + | ||
3163 | + | ||
3164 | + | ||
3165 | + | ||
3166 | + | ||
3167 | + | ||
3168 | + | ||
3169 | + | ||
3170 | + | ||
3171 | + | ||
3172 | + | ||
3173 | + | ||
3174 | + | ||
3175 | + | ||
3176 | + | ||
3177 | + | ||
3178 | + |
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 | - | ||
191 | + | ||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 | + | ||
209 | 210 |
| |
210 | 211 |
| |
211 | 212 |
| |
| |||
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
279 | + | ||
278 | 280 |
| |
279 | 281 |
| |
280 | 282 |
| |
| |||
305 | 307 |
| |
306 | 308 |
| |
307 | 309 |
| |
310 | + | ||
308 | 311 |
| |
309 | 312 |
| |
310 | 313 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
74 | 81 |
| |
75 | 82 |
| |
76 | 83 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 | - | ||
98 | + | ||
99 | 99 |
| |
100 | - | ||
101 | - | ||
100 | + | ||
101 | + | ||
102 | 102 |
| |
103 | 103 |
| |
104 | - | ||
104 | + | ||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 | - | ||
118 | + | ||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 | - | ||
123 | + | ||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | + | ||
1122 | 1123 |
| |
1123 | 1124 |
| |
1124 | 1125 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
446 | 446 |
| |
447 | 447 |
| |
448 | 448 |
| |
449 | + | ||
449 | 450 |
| |
450 | 451 |
| |
451 | 452 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | - | ||
5 | + | ||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
285 | 285 |
| |
286 | 286 |
| |
287 | 287 |
| |
288 | + | ||
288 | 289 |
| |
289 | 290 |
| |
290 | 291 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 | + | ||
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
|
0 commit comments