This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 9bb6fbe
committed
Auto merge of rust-lang#113376 - Nilstrieb:pointer-coercions-are-not-casts-because-that-sounds-way-to-general-aaaa, r=oli-obk
Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`
It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane.
This enum was added in rust-lang#59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing.
r? oli-obkFile tree
85 files changed
+214
-185
lines changed- compiler
- rustc_borrowck/src
- diagnostics
- type_check
- rustc_codegen_cranelift/src
- rustc_codegen_ssa/src/mir
- rustc_const_eval/src
- interpret
- transform
- check_consts
- rustc_hir_typeck/src
- method
- rustc_middle/src
- mir
- thir
- ty
- rustc_mir_build/src
- build
- expr
- matches
- thir
- cx
- rustc_mir_transform/src
- rustc_monomorphize/src
- rustc_ty_utils/src
- src/tools/clippy
- clippy_lints/src
- clippy_utils/src
- tests/mir-opt
- building
- const_prop
- copy-prop
- inline
- pre-codegen
- sroa
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
85 files changed
+214
-185
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
588 | 592 | | |
589 | 593 | | |
590 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
1908 | 1908 | | |
1909 | 1909 | | |
1910 | 1910 | | |
1911 | | - | |
| 1911 | + | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | 1914 | | |
| |||
1937 | 1937 | | |
1938 | 1938 | | |
1939 | 1939 | | |
1940 | | - | |
| 1940 | + | |
1941 | 1941 | | |
1942 | 1942 | | |
1943 | 1943 | | |
| |||
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
1965 | | - | |
| 1965 | + | |
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| |||
1991 | 1991 | | |
1992 | 1992 | | |
1993 | 1993 | | |
1994 | | - | |
| 1994 | + | |
1995 | 1995 | | |
1996 | 1996 | | |
1997 | 1997 | | |
| |||
2038 | 2038 | | |
2039 | 2039 | | |
2040 | 2040 | | |
2041 | | - | |
| 2041 | + | |
2042 | 2042 | | |
2043 | 2043 | | |
2044 | 2044 | | |
| |||
2080 | 2080 | | |
2081 | 2081 | | |
2082 | 2082 | | |
2083 | | - | |
| 2083 | + | |
2084 | 2084 | | |
2085 | 2085 | | |
2086 | 2086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
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 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
414 | | - | |
| 418 | + | |
415 | 419 | | |
416 | 420 | | |
417 | 421 | | |
| |||
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
430 | | - | |
| 434 | + | |
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| |||
443 | 447 | | |
444 | 448 | | |
445 | 449 | | |
446 | | - | |
| 450 | + | |
447 | 451 | | |
448 | 452 | | |
449 | 453 | | |
450 | | - | |
| 454 | + | |
451 | 455 | | |
452 | 456 | | |
453 | 457 | | |
| |||
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
473 | | - | |
| 477 | + | |
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
| |||
504 | 508 | | |
505 | 509 | | |
506 | 510 | | |
507 | | - | |
508 | | - | |
| 511 | + | |
| 512 | + | |
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
| 46 | + | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
0 commit comments