rust/compiler/rustc_trait_selection
Matthias Krüger 2de5ca25d2
Rollup merge of #119613 - gavinleroy:expose-obligations, r=lcnr
Expose Obligations created during type inference.

This PR is a first pass at exposing the trait obligations generated and solved for during the type-check progress. Exposing these obligations allows for rustc plugins to use the public interface for proof trees (provided by the next gen trait solver).

The changes proposed track *all* obligations during the type-check process, this is desirable to not only look at the trees of failed obligations, but also those of successfully proved obligations. This feature is placed behind an unstable compiler option `track-trait-obligations` which should be used together with the `next-solver` option. I should note that the main interface is the function `inspect_typeck` made public in `rustc_hir_typeck/src/lib.rs` which allows the caller to provide a callback granting access to the `FnCtxt`.

r? `@lcnr`
2024-01-20 09:37:26 +01:00
..
src Rollup merge of #119613 - gavinleroy:expose-obligations, r=lcnr 2024-01-20 09:37:26 +01:00
Cargo.toml avoid always rerunning in case of a cycle 2024-01-09 11:19:34 +01:00
messages.ftl Restrict what symbols can be used in #[diagnostic::on_unimplemented] format strings 2023-12-04 10:00:33 +01:00