Commit a395214
committed
Auto merge of rust-lang#116405 - estebank:issue-103155, r=davidtwco
Detect object safety errors when assoc type is missing
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with.
Fix rust-lang#103155.File tree
38 files changed
+249
-193
lines changed- compiler
- rustc_hir_analysis
- src/astconv
- rustc_trait_selection/src/traits
- tests/ui
- associated-type-bounds
- associated-types
- error-codes
- issues
- object-safety
- suggestions
- traits
- alias
- object
38 files changed
+249
-193
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
523 | | - | |
| 525 | + | |
| 526 | + | |
524 | 527 | | |
525 | 528 | | |
526 | 529 | | |
527 | 530 | | |
| 531 | + | |
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
531 | 535 | | |
532 | 536 | | |
533 | 537 | | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
539 | 547 | | |
540 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
541 | 552 | | |
542 | 553 | | |
543 | 554 | | |
| |||
573 | 584 | | |
574 | 585 | | |
575 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
576 | 605 | | |
| 606 | + | |
| 607 | + | |
577 | 608 | | |
578 | 609 | | |
579 | 610 | | |
580 | 611 | | |
581 | 612 | | |
582 | 613 | | |
583 | | - | |
584 | | - | |
| 614 | + | |
| 615 | + | |
585 | 616 | | |
586 | 617 | | |
587 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
0 commit comments