diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-04 12:33:51 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-10 06:07:51 -0400 |
| commit | ce7a61b9d0bb4b7bb99ade4bff2449fabc9afd3f (patch) | |
| tree | 5baec10bdd78d7ddbcc4651ea0de2e4fc732c5a9 /compiler/rustc_next_trait_solver/src | |
| parent | 09da2ebd63107997e1319c2a076021660285ef40 (diff) | |
| download | rust-ce7a61b9d0bb4b7bb99ade4bff2449fabc9afd3f.tar.gz rust-ce7a61b9d0bb4b7bb99ade4bff2449fabc9afd3f.zip | |
Uplift super_combine
Diffstat (limited to 'compiler/rustc_next_trait_solver/src')
| -rw-r--r-- | compiler/rustc_next_trait_solver/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_next_trait_solver/src/relate.rs | 15 | ||||
| -rw-r--r-- | compiler/rustc_next_trait_solver/src/relate/combine.rs | 34 |
3 files changed, 0 insertions, 50 deletions
diff --git a/compiler/rustc_next_trait_solver/src/lib.rs b/compiler/rustc_next_trait_solver/src/lib.rs index ca140500e2c..de74ac32804 100644 --- a/compiler/rustc_next_trait_solver/src/lib.rs +++ b/compiler/rustc_next_trait_solver/src/lib.rs @@ -12,6 +12,5 @@ pub mod canonicalizer; pub mod coherence; pub mod delegate; -pub mod relate; pub mod resolve; pub mod solve; diff --git a/compiler/rustc_next_trait_solver/src/relate.rs b/compiler/rustc_next_trait_solver/src/relate.rs deleted file mode 100644 index db819961bbd..00000000000 --- a/compiler/rustc_next_trait_solver/src/relate.rs +++ /dev/null @@ -1,15 +0,0 @@ -pub use rustc_type_ir::relate::*; - -pub mod combine; - -/// Whether aliases should be related structurally or not. Used -/// to adjust the behavior of generalization and combine. -/// -/// This should always be `No` unless in a few special-cases when -/// instantiating canonical responses and in the new solver. Each -/// such case should have a comment explaining why it is used. -#[derive(Debug, Copy, Clone)] -pub enum StructurallyRelateAliases { - Yes, - No, -} diff --git a/compiler/rustc_next_trait_solver/src/relate/combine.rs b/compiler/rustc_next_trait_solver/src/relate/combine.rs deleted file mode 100644 index 96968327d8e..00000000000 --- a/compiler/rustc_next_trait_solver/src/relate/combine.rs +++ /dev/null @@ -1,34 +0,0 @@ -pub use rustc_type_ir::relate::*; -use rustc_type_ir::solve::Goal; -use rustc_type_ir::{InferCtxtLike, Interner, Upcast}; - -use super::StructurallyRelateAliases; - -pub trait PredicateEmittingRelation<Infcx, I = <Infcx as InferCtxtLike>::Interner>: - TypeRelation<I> -where - Infcx: InferCtxtLike<Interner = I>, - I: Interner, -{ - fn span(&self) -> I::Span; - - fn param_env(&self) -> I::ParamEnv; - - /// Whether aliases should be related structurally. This is pretty much - /// always `No` unless you're equating in some specific locations of the - /// new solver. See the comments in these use-cases for more details. - fn structurally_relate_aliases(&self) -> StructurallyRelateAliases; - - /// Register obligations that must hold in order for this relation to hold - fn register_goals(&mut self, obligations: impl IntoIterator<Item = Goal<I, I::Predicate>>); - - /// Register predicates that must hold in order for this relation to hold. - /// This uses the default `param_env` of the obligation. - fn register_predicates( - &mut self, - obligations: impl IntoIterator<Item: Upcast<I, I::Predicate>>, - ); - - /// Register `AliasRelate` obligation(s) that both types must be related to each other. - fn register_alias_relate_predicate(&mut self, a: I::Ty, b: I::Ty); -} |
