about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-08 19:39:36 +0000
committerbors <bors@rust-lang.org>2025-09-08 19:39:36 +0000
commit9c27f27ea3bab79a2fec827ef3ae0009959d60f4 (patch)
treee1f00e3dec434fe16f9bcadeafd1a7cdf6c8a6cf /compiler/rustc_middle/src
parenta78f9aa87fa828ad4a5c11f1e3b93e94d9352ad6 (diff)
parentb51a3a565a056235f3864e2cefdb9449f6b0dcb1 (diff)
downloadrust-9c27f27ea3bab79a2fec827ef3ae0009959d60f4.tar.gz
rust-9c27f27ea3bab79a2fec827ef3ae0009959d60f4.zip
Auto merge of #140375 - lcnr:subrelations-infcx, r=BoxyUwU
eagerly compute `sub_unification_table` again

Previously called `sub_relations`. We still only using them for diagnostics right now. This mostly reverts rust-lang/rust#119989. Necessary for type inference guidance due to not-yet defined opaque types, cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/182.

We could use them for cycle detection in generalization and it seems desirable to do so in the future. However, this is unsound with the old trait solver as its cache does not track these `sub_unification_table` in any way.

We now properly track the `sub_unification_table` when canonicalizing so using them in the new solver is totally sound and the performance impact is far more manageable than I thought back in rust-lang/rust#119989.

r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/infer/canonical.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/infer/canonical.rs b/compiler/rustc_middle/src/infer/canonical.rs
index 4fe4c2dadee..153605ee7f8 100644
--- a/compiler/rustc_middle/src/infer/canonical.rs
+++ b/compiler/rustc_middle/src/infer/canonical.rs
@@ -27,7 +27,6 @@ use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::sync::Lock;
 use rustc_macros::{HashStable, TypeFoldable, TypeVisitable};
 pub use rustc_type_ir as ir;
-pub use rustc_type_ir::CanonicalTyVarKind;
 use smallvec::SmallVec;
 
 use crate::mir::ConstraintCategory;