Move all error reporting into rustc_trait_selection

This commit is contained in:
Michael Goulet
2024-07-21 15:20:41 -04:00
parent f49738ba6c
commit ce8a625092
76 changed files with 2541 additions and 2531 deletions

View File

@@ -3,7 +3,7 @@ use std::fmt::Debug;
use super::{FromSolverError, TraitEngine};
use super::{FulfillmentContext, ScrubbedTraitError};
use crate::error_reporting::traits::TypeErrCtxtExt;
use crate::error_reporting::InferCtxtErrorExt;
use crate::regions::InferCtxtRegionExt;
use crate::solve::FulfillmentCtxt as NextFulfillmentCtxt;
use crate::solve::NextSolverError;

View File

@@ -1,4 +1,3 @@
use crate::error_reporting::traits::TypeErrCtxtOverflowExt;
use crate::infer::{InferCtxt, TyOrConstInferVar};
use crate::traits::normalize::normalize_with_depth_to;
use rustc_data_structures::captures::Captures;
@@ -25,6 +24,7 @@ use super::Unimplemented;
use super::{const_evaluatable, ScrubbedTraitError};
use super::{FulfillmentError, FulfillmentErrorCode};
use crate::error_reporting::InferCtxtErrorExt;
use crate::traits::project::PolyProjectionObligation;
use crate::traits::project::ProjectionCacheKeyExt as _;
use crate::traits::query::evaluate_obligation::InferCtxtExt;

View File

@@ -22,7 +22,7 @@ mod util;
pub mod vtable;
pub mod wf;
use crate::error_reporting::traits::TypeErrCtxtExt as _;
use crate::error_reporting::InferCtxtErrorExt;
use crate::infer::outlives::env::OutlivesEnvironment;
use crate::infer::{InferCtxt, TyCtxtInferExt};
use crate::regions::InferCtxtRegionExt;

View File

@@ -3,7 +3,7 @@
use super::SelectionContext;
use super::{project, with_replaced_escaping_bound_vars, BoundVarReplacer, PlaceholderReplacer};
use crate::error_reporting::traits::OverflowCause;
use crate::error_reporting::traits::TypeErrCtxtOverflowExt;
use crate::error_reporting::InferCtxtErrorExt;
use crate::solve::NextSolverError;
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_infer::infer::at::At;

View File

@@ -3,7 +3,7 @@
//! `normalize_canonicalized_projection_ty` query when it encounters projections.
use crate::error_reporting::traits::OverflowCause;
use crate::error_reporting::traits::TypeErrCtxtOverflowExt;
use crate::error_reporting::InferCtxtErrorExt;
use crate::infer::at::At;
use crate::infer::canonical::OriginalQueryValues;
use crate::infer::{InferCtxt, InferOk};

View File

@@ -18,7 +18,7 @@ use super::{
TraitQueryMode,
};
use crate::error_reporting::traits::TypeErrCtxtOverflowExt;
use crate::error_reporting::InferCtxtErrorExt;
use crate::infer::{InferCtxt, InferCtxtExt, InferOk, TypeFreshener};
use crate::solve::InferCtxtSelectExt as _;
use crate::traits::normalize::normalize_with_depth;