diff options
| author | bors <bors@rust-lang.org> | 2024-04-26 15:37:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-26 15:37:05 +0000 |
| commit | 1b3a32958bb54bde45e693217e8f7469459e5865 (patch) | |
| tree | 838fbe762f7a870e1fcdd6fffcb756dfd4870ed5 /compiler/rustc_codegen_llvm/src | |
| parent | 9adafa7f8d72461426def828b5a8735a97eddc3f (diff) | |
| parent | 146f63782604058e31a81f62dd30d9671738398f (diff) | |
| download | rust-1b3a32958bb54bde45e693217e8f7469459e5865.tar.gz rust-1b3a32958bb54bde45e693217e8f7469459e5865.zip | |
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
