rust/compiler
Michael Goulet de49a9f2f5
Rollup merge of #112825 - compiler-errors:tait-defining-cycle, r=lcnr
Don't call `type_of` on TAIT in defining scope in new solver

It's *never* productive to call `consider_auto_trait_candidate` on a TAIT in the defining scope, since it will always lead to a query cycle since we call `type_of` on the TAIT. So let's just don't.

I've reserved this behavior just to `SolverMode::Normal` just to avoid any future problems, since this is *technically* incomplete since we're discarding a candidate that could *theoretically* apply. But given such candidate assembly *always* leads to a query cycle, I think it's relatively low risk, and I could be convinced otherwise and make this apply to both solver mode. I assume it's far less likely to be encountered in coherence, though.

This is much more likely to encounter in the new solver, though it can also be encountered in the old solver too, so I'm happy to discuss whether this new behavior we even want in the first place...

I encountered this in a couple of failing UI tests:
* `tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs`
* `tests/ui/type-alias-impl-trait/issue-93411.rs`

r? `@lcnr`
2023-07-06 20:11:39 -07:00
..
rustc
rustc_abi Auto merge of #112062 - lukas-code:unsized-layout, r=wesleywiser 2023-06-13 22:34:59 +00:00
rustc_apfloat
rustc_arena Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
rustc_ast Add effects during lowering for ~const bounds 2023-07-04 11:47:45 +00:00
rustc_ast_lowering include host_effect_index in Generics 2023-07-04 17:21:52 +00:00
rustc_ast_passes Auto merge of #113105 - matthiaskrgr:rollup-rci0uym, r=matthiaskrgr 2023-06-27 21:31:47 +00:00
rustc_ast_pretty Syntatically accept become expressions 2023-06-19 12:54:34 +00:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_builtin_macros fix typo 2023-06-28 10:52:48 +08:00
rustc_codegen_cranelift Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_codegen_gcc Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_codegen_llvm Auto merge of #113377 - BoxyUwU:move_ty_ctors_to_ty, r=compiler-errors 2023-07-06 08:10:42 +00:00
rustc_codegen_ssa Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_const_eval Rollup merge of #111917 - WaffleLapkin:validate_unalloc, r=oli-obk 2023-07-06 20:11:38 -07:00
rustc_data_structures Upgrade to indexmap 2.0.0 2023-07-03 13:51:54 -07:00
rustc_driver Downgrade rustix 2023-07-02 21:02:31 +02:00
rustc_driver_impl Add a simple markdown parser for formatting rustc --explain 2023-07-03 16:04:18 -04:00
rustc_error_codes
rustc_error_messages
rustc_errors Add a simple markdown parser for formatting rustc --explain 2023-07-03 16:04:18 -04:00
rustc_expand Rollup merge of #111571 - jhpratt:proc-macro-span, r=m-ou-se 2023-06-28 18:28:46 +05:30
rustc_feature Add feature and attribute definition 2023-07-04 11:47:45 +00:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Add bidirectional where clauses on RPITIT synthesized GATs 2023-06-29 14:26:26 -03:00
rustc_hir_analysis Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_hir_pretty hir: Add Become expression kind 2023-06-26 08:56:32 +00:00
rustc_hir_typeck Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_incremental Applied nits 2023-06-11 22:45:04 -04:00
rustc_index
rustc_infer Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_interface Remove chalk from the compiler 2023-07-03 21:40:04 +00:00
rustc_lexer Revert the lexing of c_str_literals 2023-07-05 13:11:17 +02:00
rustc_lint Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_lint_defs Make unused_associated_type_bounds's lint level changeable 2023-07-05 07:46:05 +00:00
rustc_llvm Rollup merge of #112791 - WaffleLapkin:wag_the_llvm, r=cuviper 2023-07-06 09:20:31 +08:00
rustc_log Downgrade tracing and syn 2023-07-02 21:02:31 +02:00
rustc_macros Downgrade tracing and syn 2023-07-02 21:02:31 +02:00
rustc_metadata Auto merge of #113215 - compiler-errors:rpitit-predicates-tweaks, r=spastorino 2023-07-04 04:24:24 +00:00
rustc_middle Auto merge of #113377 - BoxyUwU:move_ty_ctors_to_ty, r=compiler-errors 2023-07-06 08:10:42 +00:00
rustc_mir_build Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_mir_dataflow Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_mir_transform Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_monomorphize Diagnose unsorted CGUs. 2023-07-06 18:27:25 +10:00
rustc_parse Fix the issue of wrong diagnosis for extern pub fn 2023-07-05 16:25:46 +08:00
rustc_parse_format
rustc_passes Put LayoutError behind reference to shrink result 2023-07-01 21:16:25 +02:00
rustc_plugin_impl
rustc_privacy remove TypeWellFormedFromEnv 2023-07-03 21:40:04 +00:00
rustc_query_impl Avoid calling queries during query stack printing 2023-06-27 16:12:07 +02:00
rustc_query_system Show which type was not specialized on query cycle misuse 2023-07-05 07:30:28 +00:00
rustc_resolve resolve: Add comments explaining use of Interned 2023-07-05 13:47:37 +03:00
rustc_serialize Upgrade to indexmap 2.0.0 2023-07-03 13:51:54 -07:00
rustc_session Auto merge of #112697 - tgross35:explain-markdown, r=oli-obk 2023-07-05 06:18:46 +00:00
rustc_smir Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructures 2023-07-02 07:48:41 +08:00
rustc_span Add feature and attribute definition 2023-07-04 11:47:45 +00:00
rustc_symbol_mangling Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_target Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd. 2023-07-05 13:49:01 +00:00
rustc_trait_selection Don't call type_of on TAIT in defining scope in new solver 2023-07-06 20:13:22 +00:00
rustc_traits remove TypeWellFormedFromEnv 2023-07-03 21:40:04 +00:00
rustc_transmute Put LayoutError behind reference to shrink result 2023-07-01 21:16:25 +02:00
rustc_ty_utils Move TyCtxt::mk_x to Ty::new_x where applicable 2023-07-05 20:27:07 +01:00
rustc_type_ir move ConstKind to typeir and move inherent impls to Const 2023-07-05 09:46:30 +01:00