This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 9360e9a
authored
Unrolled build for rust-lang#116805
Rollup merge of rust-lang#116805 - Nilstrieb:onunimplemented-std-core-alloc-whatever-who-cares, r=compiler-errors
Make `rustc_onunimplemented` export path agnostic
This makes it so that all the matchers that match against paths use the definition path instead of the export path. This removes all duplication around `std`/`alloc`/`core`.
This is not necessarily optimal because we now depend on internal implementation details like `core::ops::control_flow::ControlFlow`, which is not very nice and probably not acceptable for a stable `on_unimplemented`.
An alternative would be to just string-replace normalize away `alloc`/`core` to `std` as a special case, keeping the export paths but making it so that we're still fully standard library flavor agnostic.
Looking at the diff, I'm starting to think that some simple string replacement would go a long way towards fixing the problem of duplication while keeping export paths...
What do you prefer?
Also `@weiznich` for your thoughts about the stable version.
r? compiler-errorsFile tree
7 files changed
+37
-64
lines changed- compiler/rustc_trait_selection/src/traits/error_reporting
- library/core/src
- convert
- iter/traits
- ops
- slice
7 files changed
+37
-64
lines changedLines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
| 300 | + | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
| |||
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
581 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
582 | 585 | | |
583 | 586 | | |
584 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
| 612 | + | |
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
624 | | - | |
| 624 | + | |
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
| 628 | + | |
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 229 | + | |
| 230 | + | |
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
| |||
243 | 237 | | |
244 | 238 | | |
245 | 239 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 240 | + | |
250 | 241 | | |
251 | 242 | | |
252 | 243 | | |
| |||
259 | 250 | | |
260 | 251 | | |
261 | 252 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 253 | + | |
| 254 | + | |
270 | 255 | | |
271 | 256 | | |
272 | 257 | | |
| |||
276 | 261 | | |
277 | 262 | | |
278 | 263 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 264 | + | |
283 | 265 | | |
284 | 266 | | |
285 | 267 | | |
| |||
291 | 273 | | |
292 | 274 | | |
293 | 275 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 276 | + | |
| 277 | + | |
302 | 278 | | |
303 | 279 | | |
304 | 280 | | |
| |||
309 | 285 | | |
310 | 286 | | |
311 | 287 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 288 | + | |
316 | 289 | | |
317 | 290 | | |
318 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 155 | + | |
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
| |||
0 commit comments