rust/compiler
Ali MJ Al-Nasrawy 9a07292ce6
Rollup merge of #118964 - compiler-errors:resolve, r=aliemjay
Opportunistically resolve region var in canonicalizer (instead of resolving root var)

See comment in `compiler/rustc_type_ir/src/infcx.rs`.

The **root** infer region for a given region vid may not actually be nameable from the universe of the original vid. That means that the assertion in the canonicalizer was too strict, since the `EagerResolver` that we use before canonicalizing is doing only as much resolving as it can.

This replaces `resolve_lt_var` and `probe_lt_var` in the `rustc_type_ir` API with `opportunistic_resolve_lt_var`, which acts as you expect it should. I left a FIXME that complains about the inconsistency.

This test is really gnarly, but I have no idea how to minimize it, since it seems to kind of just be coincidental that it triggered this issue. I hope the underlying root cause is easy enough to understand, though.

r? `@lcnr` or `@aliemjay`

Fixes #118950
2023-12-15 10:58:23 +03:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Rename LayoutCalculator::delay_bug as LayoutCalculator::delayed_bug. 2023-12-02 09:01:34 +11:00
rustc_arena rustc_arena: add alloc_str 2023-12-05 17:52:51 -08:00
rustc_ast Don't gate the feature twice 2023-12-12 14:52:05 +01:00
rustc_ast_lowering Rollup merge of #118759 - compiler-errors:bare-unit-structs, r=petrochenkov 2023-12-13 18:03:33 +01:00
rustc_ast_passes Correctly gate the parsing of match arms without body 2023-12-12 14:42:04 +01:00
rustc_ast_pretty Rollup merge of #118726 - dtolnay:matchguardlet, r=compiler-errors 2023-12-11 20:46:49 +01:00
rustc_attr Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_builtin_macros Avoid struct_diagnostic where possible. 2023-12-14 15:53:55 +11:00
rustc_codegen_cranelift update use of feature flags 2023-12-14 15:22:37 +01:00
rustc_codegen_gcc Move rustc_codegen_ssa target features to rustc_target 2023-12-14 14:40:55 +01:00
rustc_codegen_llvm Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_codegen_ssa Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_const_eval Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_data_structures Auto merge of #117050 - c410-f3r:here-we-go-again, r=petrochenkov 2023-12-13 06:37:08 +00:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl clippy::complexity fixes 2023-12-12 19:28:13 +01:00
rustc_error_codes Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
rustc_error_messages Remove rustc_error_messages/messages.ftl. 2023-11-26 08:37:27 +11:00
rustc_errors Split Handler::emit_diagnostic in two. 2023-12-15 10:13:12 +11:00
rustc_expand Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_feature Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
rustc_fluent_macro Add a useful comment. 2023-11-26 08:38:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz remove unused pub fn 2023-11-23 14:11:02 +03:00
rustc_hir Auto merge of #118420 - compiler-errors:async-gen, r=eholk 2023-12-08 19:13:57 +00:00
rustc_hir_analysis update use of feature flags 2023-12-14 15:22:37 +01:00
rustc_hir_pretty remove redundant imports 2023-12-10 10:56:22 +08:00
rustc_hir_typeck Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_incremental Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
rustc_index Replace no_ord_impl with orderable. 2023-11-22 18:38:17 +11:00
rustc_index_macros Put backticks around some attributes in doc comments. 2023-11-27 09:37:01 +11:00
rustc_infer Opportunistically resolve region var in canonicalizer 2023-12-15 05:02:37 +00:00
rustc_interface rename -Ztrait-solver to -Znext-solver 2023-12-14 15:22:37 +01:00
rustc_lexer Tweak Mode. 2023-12-09 09:30:32 +11:00
rustc_lint Auto merge of #118213 - Urgau:check-cfg-diagnostics-rustc-cargo, r=petrochenkov 2023-12-13 19:45:57 +00:00
rustc_lint_defs Rollup merge of #117927 - ehuss:future-incompat-docs, r=wesleywiser 2023-12-12 17:40:53 +01:00
rustc_llvm llvm-wrapper: adapt for LLVM API change 2023-12-12 12:29:30 +00:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros remove redundant imports 2023-12-10 10:56:22 +08:00
rustc_metadata Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
rustc_middle Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_mir_build Auto merge of #118500 - ZetaNumbers:tcx_hir_refactor, r=petrochenkov 2023-12-13 10:31:56 +00:00
rustc_mir_dataflow remove redundant imports 2023-12-10 10:56:22 +08:00
rustc_mir_transform Auto merge of #118770 - saethlin:fix-inline-never-uses, r=nnethercote 2023-12-15 04:54:14 +00:00
rustc_monomorphize Auto merge of #118770 - saethlin:fix-inline-never-uses, r=nnethercote 2023-12-15 04:54:14 +00:00
rustc_next_trait_solver Opportunistically resolve region var in canonicalizer 2023-12-15 05:02:37 +00:00
rustc_parse Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_parse_format Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstrieb 2023-11-15 14:55:35 +00:00
rustc_passes Auto merge of #118870 - Enselic:rustc_passes-query-stability, r=compiler-errors 2023-12-13 12:47:43 +00:00
rustc_pattern_analysis Update compiler/rustc_pattern_analysis/src/constructor.rs 2023-12-12 21:12:19 +01:00
rustc_privacy Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
rustc_query_impl QueryContext: rename try_collect_active_jobs -> collect_active_jobs and change it's return type from Option<QueryMap> to QueryMap 2023-11-27 18:13:15 +03:00
rustc_query_system Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_resolve Rollup merge of #118889 - matthiaskrgr:compl_2023_2, r=WaffleLapkin 2023-12-12 18:48:54 -08:00
rustc_serialize Call FileEncoder::finish in rmeta encoding 2023-11-22 22:49:22 -05:00
rustc_session Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors 2023-12-14 16:07:48 -08:00
rustc_smir Address PR comments 2023-12-14 17:56:33 -08:00
rustc_span Auto merge of #117758 - Urgau:lint_pointer_trait_comparisons, r=davidtwco 2023-12-11 14:33:16 +00:00
rustc_symbol_mangling Typo 2023-12-12 13:48:20 -05:00
rustc_target Move rustc_codegen_ssa target features to rustc_target 2023-12-14 14:40:55 +01:00
rustc_trait_selection Unconditionally register alias-relate in projection goal 2023-12-14 18:41:23 +00:00
rustc_traits add unused NormalizesTo predicate 2023-12-07 17:52:51 +01:00
rustc_transmute Update itertools to 0.11. 2023-11-22 08:13:21 +11:00
rustc_ty_utils Rollup merge of #118871 - tmiasko:coroutine-maybe-uninit-fields, r=compiler-errors 2023-12-13 18:03:33 +01:00
rustc_type_ir Opportunistically resolve region var in canonicalizer 2023-12-15 05:02:37 +00:00
stable_mir Rollup merge of #118927 - celinval:smir-missing-info, r=compiler-errors 2023-12-15 10:58:23 +03:00