diff options
| author | lcnr <rust@lcnr.de> | 2024-01-15 11:44:56 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-02-22 17:29:25 +0100 |
| commit | 91535ad0265abbe40733fdd451216efdf28ffd02 (patch) | |
| tree | 82cb6463c89d3ec3f26db8d7fef5f0bd72e26140 /compiler/rustc_trait_selection/src | |
| parent | 1bb3a9f67a2ff6bd49c513ca1b8954237298c4b3 (diff) | |
| download | rust-91535ad0265abbe40733fdd451216efdf28ffd02.tar.gz rust-91535ad0265abbe40733fdd451216efdf28ffd02.zip | |
remove `sub_relations` from infcx, recompute in diagnostics
we don't track them when canonicalizing or when freshening, resulting in instable caching in the old solver, and issues when instantiating query responses in the new one.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index 7186b96b40d..be4c6b4d9d1 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -63,6 +63,10 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { &self, mut errors: Vec<FulfillmentError<'tcx>>, ) -> ErrorGuaranteed { + self.sub_relations + .borrow_mut() + .add_constraints(self, errors.iter().map(|e| e.obligation.predicate)); + #[derive(Debug)] struct ErrorDescriptor<'tcx> { predicate: ty::Predicate<'tcx>, |
