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``
This commit is contained in:
commit
4cd157e6b9
22 changed files with 334 additions and 183 deletions
|
@ -971,7 +971,7 @@ pub struct ParamEnv<'tcx> {
|
|||
}
|
||||
|
||||
impl<'tcx> rustc_type_ir::inherent::ParamEnv<TyCtxt<'tcx>> for ParamEnv<'tcx> {
|
||||
fn caller_bounds(self) -> impl IntoIterator<Item = ty::Clause<'tcx>> {
|
||||
fn caller_bounds(self) -> impl inherent::SliceLike<Item = ty::Clause<'tcx>> {
|
||||
self.caller_bounds()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue