rust/compiler/rustc_middle/src/ty
Jacob Pratt 4cd157e6b9
Rollup merge of #133643 - lcnr:merge-candidates, r=compiler-errors
-Znext-solver: modify candidate preference rules

This implements the design proposed in the FCP in #132325 and matches the old solver behavior. I hope the inline comments are all sufficiently clear, I personally think this is a fairly clear improvement over the existing approach using `fn discard_impls_shadowed_by_env`. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/96.

This also fixes #133639 which encounters an ICE in negative coherence when evaluating the where-clause. Given the features required to trigger this ICE 🤷

r? ``@compiler-errors``
2024-12-18 21:38:08 -05:00
..
consts Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
context Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
inhabitedness use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
print Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
abstract_const.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
adjustment.rs Register const preds for Deref adjustments in HIR typeck 2024-11-04 04:51:31 +00:00
adt.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
assoc.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
cast.rs unify dyn* coercions with other pointer coercions 2024-09-24 22:17:55 +02:00
closure.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
codec.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
consts.rs Move Const::{from_anon_const,try_from_lit} to hir_ty_lowering 2024-12-02 19:34:47 +00:00
context.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
diagnostics.rs update uses of extract_if in the compiler 2024-12-16 22:06:52 +01:00
elaborate_impl.rs Uplift elaboration 2024-07-07 11:28:01 -04:00
erase_regions.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
error.rs Simplify array length mismatch error reporting 2024-11-24 03:32:11 +00:00
fast_reject.rs Use DeepRejectCtxt to quickly reject ParamEnv candidates 2024-09-02 19:59:18 +03:00
flags.rs Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
fold.rs uplift fold_regions to rustc_type_ir 2024-11-28 10:40:58 +01:00
generic_args.rs Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
generics.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
impls_ty.rs const-eval interning: accpt interior mutable pointers in final value (but keep rejecting mutable references) 2024-09-10 10:26:16 +02:00
instance.rs rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures 2024-12-16 19:08:19 +01:00
intrinsic.rs add new rustc_const_stable_intrinsic attribute for const-stable intrinsics 2024-11-04 23:27:46 +01:00
layout.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
list.rs Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
mod.rs update new solver candidate assembly 2024-12-18 16:35:05 +01:00
normalize_erasing_regions.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
opaque_types.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
parameterized.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
pattern.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
predicate.rs Implement const effect predicate in new solver 2024-10-24 09:46:36 +00:00
region.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
relate.rs Rollup merge of #133362 - compiler-errors:existential-preds, r=BoxyUwU 2024-11-26 12:03:43 -05:00
return_position_impl_trait_in_trait.rs Implement projection and shim for AFIDT 2024-12-10 16:52:20 +00:00
rvalue_scopes.rs reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00
structural_impls.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
sty.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
trait_def.rs Separate collection of crate-local inherent impls from error reporting 2024-09-24 10:12:05 -04:00
typeck_results.rs Clarify the match ergonomics 2024 migration lint's output 2024-12-17 13:38:21 -08:00
util.rs Rollup merge of #134285 - oli-obk:push-vwrqsqlwnuxo, r=Urgau 2024-12-15 20:01:38 +11:00
visit.rs Handle rustc-hir-analysis cases of rustc::potential_query_instability lint 2024-10-02 08:28:45 +03:00
vtable.rs Remove polymorphization 2024-12-06 16:42:09 -05:00
walk.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00