rust/compiler/rustc_middle/src
bors 1b3a32958b Auto merge of #122385 - lcnr:analyze-obligations-for-infer, r=compiler-errors
`obligations_for_self_ty`: use `ProofTreeVisitor` for nested goals

As always, dealing with proof trees continues to be a hacked together mess. After this PR and #124380 the only remaining blocker for core is https://github.com/rust-lang/trait-system-refactor-initiative/issues/90. There is also a `ProofTreeVisitor` issue causing an ICE when compiling `alloc` which I will handle in a separate PR. This issue likely affects coherence diagnostics more generally.

The core idea is to extend the proof tree visitor to support visiting nested candidates without using a `probe`. We then simply recurse into nested candidates if they are the only potentially applicable candidate for a given goal and check whether the self type matches the expected one.

For that to work, we need to improve `CanonicalState` to also handle unconstrained inference variables created inside of the trait solver. This is done by extending the `var_values` of `CanoncalState` with each fresh inference variables. Furthermore, we also store the state of all inference variables at the end of each probe. When recursing into `InspectCandidates` we then unify the values of all these states.

r? `@compiler-errors`
2024-04-26 15:37:05 +00:00
..
dep_graph Use a dyn Debug trait object instead of a closure. 2024-03-27 10:59:18 +00:00
hir Auto merge of #123468 - compiler-errors:precise-capturing, r=oli-obk 2024-04-16 11:22:35 +00:00
hooks Rollup merge of #124016 - DaniPopes:dedup-default-providers, r=lcnr 2024-04-16 21:41:26 +02:00
infer nits 2024-04-15 16:52:51 -04:00
middle Rollup merge of #124067 - RalfJung:weak-lang-items, r=davidtwco 2024-04-23 12:10:25 +02:00
mir filter required_consts during inlining 2024-04-23 23:02:54 +02:00
query Auto merge of #123992 - compiler-errors:no-has-typeck-results, r=jackh726 2024-04-23 04:13:33 +00:00
thir Track mutability of deref patterns 2024-04-20 15:59:54 +02:00
traits Auto merge of #122385 - lcnr:analyze-obligations-for-infer, r=compiler-errors 2024-04-26 15:37:05 +00:00
ty Auto merge of #120845 - petrochenkov:debmac, r=oli-obk 2024-04-26 02:13:08 +00:00
util remove some ancient debug output, looks unused? 2024-04-13 11:30:48 +03:00
arena.rs Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
error.rs Rename DiagnosticMessage as DiagMessage. 2024-03-05 12:14:49 +11:00
lib.rs Stabilise inline_const 2024-04-24 13:12:25 +01:00
lint.rs Guard decorate on when not to skip instead 2024-03-17 15:07:22 +00:00
macros.rs Remove unnecessary braces from span_bug 2024-03-21 11:24:24 -04:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs Remove outdated references to librustc_middle. 2024-01-05 16:34:52 +00:00
thir.rs Rollup merge of #122598 - Nadrieril:full-derefpats, r=matthewjasper 2024-04-23 17:25:15 +02:00
values.rs make Representability::Infinite carry ErrorGuaranteed 2024-03-14 20:52:13 +01:00