-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit f373402
[Experimental]
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.<T as Into<T>>::into
lint1 parent 6de928d commit f373402
File tree
28 files changed
+216
-34
lines changed- compiler
- rustc_ast/src
- rustc_const_eval/src
- const_eval
- interpret
- rustc_hir_typeck/src/fn_ctxt
- rustc_lint
- src
- rustc_middle/src/ty
- print
- rustc_parse/src/parser
- rustc_span/src
- rustc_symbol_mangling/src
- rustc_trait_selection/src/traits
- 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
28 files changed
+216
-34
lines changedLines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3464 | 3464 |
| |
3465 | 3465 |
| |
3466 | 3466 |
| |
3467 | - | ||
3467 | + | ||
3468 | 3468 |
| |
3469 | 3469 |
| |
3470 | 3470 |
| |
| |||
3478 | 3478 |
| |
3479 | 3479 |
| |
3480 | 3480 |
| |
3481 | - | ||
3482 | - | ||
3483 | - | ||
3481 | + | ||
3484 | 3482 |
| |
3485 | 3483 |
| |
3486 | 3484 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 | - | ||
81 | + | ||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
854 | 854 |
| |
855 | 855 |
| |
856 | 856 |
| |
857 | - | ||
857 | + | ||
858 | 858 |
| |
859 | 859 |
| |
860 | 860 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2533 | 2533 |
| |
2534 | 2534 |
| |
2535 | 2535 |
| |
2536 | - | ||
2536 | + | ||
2537 | 2537 |
| |
2538 | 2538 |
| |
2539 | 2539 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
132 | + | ||
133 | + | ||
132 | 134 |
| |
133 | 135 |
| |
134 | 136 |
| |
|
Lines changed: 94 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 | - | ||
69 | + | ||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| |||
1604 | 1604 |
| |
1605 | 1605 |
| |
1606 | 1606 |
| |
1607 | + | ||
1607 | 1608 |
| |
1608 | 1609 |
| |
1609 | 1610 |
| |
| |||
3064 | 3065 |
| |
3065 | 3066 |
| |
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 | + |
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
188 | - | ||
188 | + | ||
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
| |||
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
206 | + | ||
206 | 207 |
| |
207 | 208 |
| |
208 | 209 |
| |
| |||
268 | 269 |
| |
269 | 270 |
| |
270 | 271 |
| |
272 | + | ||
271 | 273 |
| |
272 | 274 |
| |
273 | 275 |
| |
| |||
298 | 300 |
| |
299 | 301 |
| |
300 | 302 |
| |
303 | + | ||
301 | 304 |
| |
302 | 305 |
| |
303 | 306 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
75 | 82 |
| |
76 | 83 |
| |
77 | 84 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 | - | ||
96 | + | ||
97 | 97 |
| |
98 | - | ||
99 | - | ||
98 | + | ||
99 | + | ||
100 | 100 |
| |
101 | 101 |
| |
102 | - | ||
102 | + | ||
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 | - | ||
116 | + | ||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 | - | ||
121 | + | ||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
387 | - | ||
387 | + | ||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
|
0 commit comments