This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 29ed096
authored
Unrolled build for rust-lang#129383
Rollup merge of rust-lang#129383 - cjgillot:opaque-noremap, r=compiler-errors,petrochenkov
Remap impl-trait lifetimes on HIR instead of AST lowering
Current AST->HIR lowering goes out of its way to remap lifetimes for opaque types. This is complicated and leaks into upstream and downstream code.
This PR stops trying to be clever during lowering, and prefers to do this remapping during the HIR->ty lowering. The remapping computation easily fits into the bound var resolution code. Its result can be used in by `generics_of` and `hir_ty_lowering::new_opaque` to add the proper parameters and arguments.
See an example on the doc for query `opaque_captured_lifetimes`.
Based on rust-lang#129244
Fixes rust-lang#125249
Fixes rust-lang#126850
cc `@compiler-errors` `@spastorino`
r? `@petrochenkov`38 files changed
Lines changed: 512 additions & 746 deletions
File tree
- compiler
- rustc_ast_lowering/src
- rustc_borrowck/src/diagnostics
- rustc_hir_analysis/src
- collect
- hir_ty_lowering
- rustc_hir_pretty/src
- rustc_hir/src
- rustc_lint/src
- rustc_middle/src
- middle
- query
- ty
- rustc_resolve/src
- rustc_trait_selection/src/error_reporting
- infer
- nice_region_error
- traits
- rustc_ty_utils/src
- src
- librustdoc/clean
- tools/clippy
- clippy_lints/src
- clippy_utils/src
- tests/ui
- tests
- crashes
- ui
- associated-type-bounds/return-type-notation
- impl-trait
- in-trait
- type-alias-impl-trait
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2627 | 2627 | | |
2628 | 2628 | | |
2629 | 2629 | | |
2630 | | - | |
2631 | 2630 | | |
2632 | 2631 | | |
2633 | 2632 | | |
| |||
2746 | 2745 | | |
2747 | 2746 | | |
2748 | 2747 | | |
2749 | | - | |
2750 | 2748 | | |
2751 | 2749 | | |
2752 | | - | |
2753 | | - | |
2754 | | - | |
2755 | | - | |
2756 | | - | |
2757 | | - | |
2758 | | - | |
2759 | | - | |
2760 | | - | |
2761 | | - | |
2762 | 2750 | | |
2763 | 2751 | | |
2764 | 2752 | | |
| |||
2861 | 2849 | | |
2862 | 2850 | | |
2863 | 2851 | | |
2864 | | - | |
2865 | | - | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
2869 | | - | |
| 2852 | + | |
2870 | 2853 | | |
2871 | 2854 | | |
2872 | 2855 | | |
| |||
3991 | 3974 | | |
3992 | 3975 | | |
3993 | 3976 | | |
3994 | | - | |
3995 | 3977 | | |
3996 | 3978 | | |
3997 | 3979 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
899 | | - | |
| 899 | + | |
900 | 900 | | |
901 | | - | |
902 | 901 | | |
903 | 902 | | |
904 | 903 | | |
| |||
1188 | 1187 | | |
1189 | 1188 | | |
1190 | 1189 | | |
1191 | | - | |
1192 | | - | |
| 1190 | + | |
1193 | 1191 | | |
1194 | | - | |
1195 | 1192 | | |
1196 | 1193 | | |
1197 | 1194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | | - | |
| 1305 | + | |
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
429 | 444 | | |
430 | 445 | | |
431 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 332 | | |
340 | 333 | | |
341 | 334 | | |
| |||
0 commit comments