Commit 0197366
committed
Auto merge of #127808 - oli-obk:tainting_visitors2, r=<try>
Make ErrorGuaranteed discoverable outside types, consts, and lifetimes
types like `PatKind` could contain `ErrorGuaranteed`, but not return them via `tainted_by_errors` or `error_reported` (see #127687 (comment)). Now this happens, but it's a bit fragile as you can see with the `TypeSuperVisitable for Ty` impl.
We will catch any problems around Ty, Region or Const at runtime with an assert, and everything using derives will not have such issues, as it will just invoke the `TypeVisitable for ErrorGuaranteed` implFile tree
2 files changed
+29
-32
lines changed- compiler
- rustc_middle/src/ty
- rustc_type_ir/src
2 files changed
+29
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
| |||
443 | 442 | | |
444 | 443 | | |
445 | 444 | | |
| 445 | + | |
| 446 | + | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
452 | | - | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
605 | 620 | | |
606 | 621 | | |
607 | 622 | | |
| |||
617 | 632 | | |
618 | 633 | | |
619 | 634 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | 635 | | |
627 | 636 | | |
628 | 637 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
| 558 | + | |
| 559 | + | |
572 | 560 | | |
573 | 561 | | |
0 commit comments