From c70ef36f2cd7e505022a534a9a9bb9f472cf3610 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 10 Oct 2023 09:55:22 +0000 Subject: [PATCH] reorder files in solve --- .../src/solve/{eval_ctxt.rs => eval_ctxt/mod.rs} | 0 compiler/rustc_trait_selection/src/solve/mod.rs | 3 --- .../src/solve/{ => project_goals}/inherent_projection.rs | 0 .../src/solve/{project_goals.rs => project_goals/mod.rs} | 4 ++++ .../src/solve/{ => project_goals}/opaques.rs | 2 +- .../src/solve/{ => project_goals}/weak_types.rs | 0 .../src/solve/{search_graph/mod.rs => search_graph.rs} | 0 7 files changed, 5 insertions(+), 4 deletions(-) rename compiler/rustc_trait_selection/src/solve/{eval_ctxt.rs => eval_ctxt/mod.rs} (100%) rename compiler/rustc_trait_selection/src/solve/{ => project_goals}/inherent_projection.rs (100%) rename compiler/rustc_trait_selection/src/solve/{project_goals.rs => project_goals/mod.rs} (99%) rename compiler/rustc_trait_selection/src/solve/{ => project_goals}/opaques.rs (98%) rename compiler/rustc_trait_selection/src/solve/{ => project_goals}/weak_types.rs (100%) rename compiler/rustc_trait_selection/src/solve/{search_graph/mod.rs => search_graph.rs} (100%) diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt/mod.rs similarity index 100% rename from compiler/rustc_trait_selection/src/solve/eval_ctxt.rs rename to compiler/rustc_trait_selection/src/solve/eval_ctxt/mod.rs diff --git a/compiler/rustc_trait_selection/src/solve/mod.rs b/compiler/rustc_trait_selection/src/solve/mod.rs index 77a3b5e128457..d45fe102805ad 100644 --- a/compiler/rustc_trait_selection/src/solve/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/mod.rs @@ -32,14 +32,11 @@ mod assembly; mod canonicalize; mod eval_ctxt; mod fulfill; -mod inherent_projection; pub mod inspect; mod normalize; -mod opaques; mod project_goals; mod search_graph; mod trait_goals; -mod weak_types; pub use eval_ctxt::{ EvalCtxt, GenerateProofTree, InferCtxtEvalExt, InferCtxtSelectExt, UseGlobalCache, diff --git a/compiler/rustc_trait_selection/src/solve/inherent_projection.rs b/compiler/rustc_trait_selection/src/solve/project_goals/inherent_projection.rs similarity index 100% rename from compiler/rustc_trait_selection/src/solve/inherent_projection.rs rename to compiler/rustc_trait_selection/src/solve/project_goals/inherent_projection.rs diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals/mod.rs similarity index 99% rename from compiler/rustc_trait_selection/src/solve/project_goals.rs rename to compiler/rustc_trait_selection/src/solve/project_goals/mod.rs index 339a3e738467c..2c000293f268d 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals/mod.rs @@ -18,6 +18,10 @@ use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_middle::ty::{ToPredicate, TypeVisitableExt}; use rustc_span::{sym, ErrorGuaranteed, DUMMY_SP}; +mod inherent_projection; +mod opaques; +mod weak_types; + impl<'tcx> EvalCtxt<'_, 'tcx> { #[instrument(level = "debug", skip(self), ret)] pub(super) fn compute_projection_goal( diff --git a/compiler/rustc_trait_selection/src/solve/opaques.rs b/compiler/rustc_trait_selection/src/solve/project_goals/opaques.rs similarity index 98% rename from compiler/rustc_trait_selection/src/solve/opaques.rs rename to compiler/rustc_trait_selection/src/solve/project_goals/opaques.rs index f08adc0208b57..ebd129f32b919 100644 --- a/compiler/rustc_trait_selection/src/solve/opaques.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals/opaques.rs @@ -7,7 +7,7 @@ use rustc_middle::traits::Reveal; use rustc_middle::ty; use rustc_middle::ty::util::NotUniqueParam; -use super::{EvalCtxt, SolverMode}; +use crate::solve::{EvalCtxt, SolverMode}; impl<'tcx> EvalCtxt<'_, 'tcx> { pub(super) fn normalize_opaque_type( diff --git a/compiler/rustc_trait_selection/src/solve/weak_types.rs b/compiler/rustc_trait_selection/src/solve/project_goals/weak_types.rs similarity index 100% rename from compiler/rustc_trait_selection/src/solve/weak_types.rs rename to compiler/rustc_trait_selection/src/solve/project_goals/weak_types.rs diff --git a/compiler/rustc_trait_selection/src/solve/search_graph/mod.rs b/compiler/rustc_trait_selection/src/solve/search_graph.rs similarity index 100% rename from compiler/rustc_trait_selection/src/solve/search_graph/mod.rs rename to compiler/rustc_trait_selection/src/solve/search_graph.rs