rust/compiler
nils fd5af8cc23
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
implement the skeleton of the updated trait solver

cc ```@rust-lang/initiative-trait-system-refactor```

This is mostly following the architecture discussed in the types team meetup.

After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.

This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization

A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.

r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23 18:02:13 +01:00
..
rustc
rustc_abi Auto merge of #105446 - erikdesjardins:vt-size, r=nikic 2022-12-18 22:01:39 +00:00
rustc_apfloat compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_arena compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00
rustc_ast_lowering Update track_caller tests; run fmt 2022-12-21 23:25:08 +00:00
rustc_ast_passes Allow impl ~const Trait opaque types 2022-12-15 11:26:15 +00:00
rustc_ast_pretty Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov 2022-12-12 05:16:50 +00:00
rustc_attr rustc_attr remove ref patterns 2022-12-06 14:45:58 +00:00
rustc_baked_icu_data Update crate documentation of rustc_baked_icu_data crate 2022-11-18 14:46:36 -08:00
rustc_borrowck Hackily fix an opaque type ICE 2022-12-20 13:43:41 +00:00
rustc_builtin_macros Rollup merge of #105978 - jyn514:unused_proc_macro_decl, r=tmiasko 2022-12-23 01:17:50 +01:00
rustc_codegen_cranelift Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJung 2022-12-21 23:20:04 +00:00
rustc_codegen_gcc Auto merge of #105252 - bjorn3:codegen_less_pair_values, r=nagisa 2022-12-12 10:38:31 +00:00
rustc_codegen_llvm Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3 2022-12-23 01:17:50 +01:00
rustc_codegen_ssa Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJung 2022-12-21 23:20:04 +00:00
rustc_const_eval Auto merge of #106054 - matthiaskrgr:rollup-38epsfh, r=matthiaskrgr 2022-12-22 20:48:33 +00:00
rustc_data_structures Bump cfg-if to 1.0 2022-12-20 13:03:45 +00:00
rustc_driver Make sess.bug much less noisy 2022-12-22 12:44:13 -06:00
rustc_error_codes Rollup merge of #105791 - Ezrashaw:add-e0472-long-docs, r=GuillaumeGomez 2022-12-20 23:35:14 +01:00
rustc_error_messages Rollup merge of #106057 - jyn514:trimmed-def-paths-ice, r=compiler-errors 2022-12-23 01:17:51 +01:00
rustc_errors more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_expand don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_feature Auto merge of #102318 - Amanieu:default_alloc_error_handler, r=oli-obk 2022-12-16 21:08:45 +00:00
rustc_fs_util Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_graphviz Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_hir Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk 2022-12-20 07:27:01 +00:00
rustc_hir_analysis Rollup merge of #106010 - oli-obk:tait_coherence_diagnostic, r=compiler-errors 2022-12-22 11:03:52 +01:00
rustc_hir_pretty more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_hir_typeck Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko 2022-12-22 19:36:13 +01:00
rustc_incremental don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_index A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00
rustc_infer Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors 2022-12-23 18:02:13 +01:00
rustc_interface Auto merge of #105812 - ojeda:no-jump-tables, r=nikic 2022-12-21 17:38:38 +00:00
rustc_lexer minor code cleanups 2022-12-12 19:49:53 +01:00
rustc_lint Rollup merge of #104741 - bryangarza:bug-104588-async-track-caller, r=compiler-errors 2022-12-22 11:03:49 +01:00
rustc_lint_defs Downgrade IMPLIED_BOUNDS_ENTAILMENT to warn by default, add it to builtin lint list 2022-12-19 18:16:22 +00:00
rustc_llvm llvm-wrapper: adapt for LLVM API changes 2022-12-11 09:14:50 +00:00
rustc_log
rustc_macros Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk 2022-12-20 07:27:01 +00:00
rustc_metadata Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errors 2022-12-18 23:03:07 +01:00
rustc_middle Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors 2022-12-23 18:02:13 +01:00
rustc_mir_build Fix the issue number in comment for as_local_call_operand 2022-12-22 20:06:53 +01:00
rustc_mir_dataflow Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk 2022-12-20 07:27:01 +00:00
rustc_mir_transform Retag argument to drop_in_place unconditionally 2022-12-21 14:59:55 -08:00
rustc_monomorphize clippy::complexity fixes 2022-12-19 00:04:28 +01:00
rustc_parse Rollup merge of #105864 - matthiaskrgr:compl, r=Nilstrieb 2022-12-19 14:41:35 +05:30
rustc_parse_format Assert size of rustc_parse_format::Piece<'_> 2022-12-08 22:50:39 +00:00
rustc_passes Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk 2022-12-20 07:27:01 +00:00
rustc_plugin_impl
rustc_privacy Prevent the creation of TraitRef without dedicated methods 2022-12-14 15:36:39 +00:00
rustc_query_impl don't clone Copy types 2022-12-18 14:25:55 +01:00
rustc_query_system A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00
rustc_resolve Rollup merge of #105769 - lyming2007:issue-105177-fix, r=eholk 2022-12-22 11:03:50 +01:00
rustc_save_analysis compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_serialize compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_session Auto merge of #105812 - ojeda:no-jump-tables, r=nikic 2022-12-21 17:38:38 +00:00
rustc_smir
rustc_span Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJung 2022-12-21 23:20:04 +00:00
rustc_symbol_mangling clippy::complexity fixes 2022-12-19 00:04:28 +01:00
rustc_target A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00
rustc_trait_selection Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors 2022-12-23 18:02:13 +01:00
rustc_traits Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
rustc_transmute Rollup merge of #105864 - matthiaskrgr:compl, r=Nilstrieb 2022-12-19 14:41:35 +05:30
rustc_ty_utils Rollup merge of #105623 - compiler-errors:generator-type-size-fix, r=Nilstrieb 2022-12-15 12:46:00 +01:00
rustc_type_ir A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00