mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 16:37:36 +00:00
Make normalize and normalize_to pub(crate)
This commit is contained in:
parent
06786227fd
commit
ce409b5200
@ -1595,6 +1595,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||||||
bound_predicate.rebind(data),
|
bound_predicate.rebind(data),
|
||||||
);
|
);
|
||||||
let mut obligations = vec![];
|
let mut obligations = vec![];
|
||||||
|
// FIXME(normalization): Change this to use `At::normalize`
|
||||||
let normalized_ty = super::normalize_projection_type(
|
let normalized_ty = super::normalize_projection_type(
|
||||||
&mut selcx,
|
&mut selcx,
|
||||||
obligation.param_env,
|
obligation.param_env,
|
||||||
|
@ -56,7 +56,8 @@ pub use self::object_safety::astconv_object_safety_violations;
|
|||||||
pub use self::object_safety::is_vtable_safe_method;
|
pub use self::object_safety::is_vtable_safe_method;
|
||||||
pub use self::object_safety::MethodViolationCode;
|
pub use self::object_safety::MethodViolationCode;
|
||||||
pub use self::object_safety::ObjectSafetyViolation;
|
pub use self::object_safety::ObjectSafetyViolation;
|
||||||
pub use self::project::{normalize, normalize_projection_type, normalize_to, NormalizeExt};
|
pub use self::project::{NormalizeExt, normalize_projection_type};
|
||||||
|
pub(crate) use self::project::{normalize, normalize_to};
|
||||||
pub use self::select::{EvaluationCache, SelectionCache, SelectionContext};
|
pub use self::select::{EvaluationCache, SelectionCache, SelectionContext};
|
||||||
pub use self::select::{EvaluationResult, IntercrateAmbiguityCause, OverflowError};
|
pub use self::select::{EvaluationResult, IntercrateAmbiguityCause, OverflowError};
|
||||||
pub use self::specialize::specialization_graph::FutureCompatOverlapError;
|
pub use self::specialize::specialization_graph::FutureCompatOverlapError;
|
||||||
|
@ -307,7 +307,7 @@ fn project_and_unify_type<'cx, 'tcx>(
|
|||||||
/// them with a fully resolved type where possible. The return value
|
/// them with a fully resolved type where possible. The return value
|
||||||
/// combines the normalized result and any additional obligations that
|
/// combines the normalized result and any additional obligations that
|
||||||
/// were incurred as result.
|
/// were incurred as result.
|
||||||
pub fn normalize<'a, 'b, 'tcx, T>(
|
pub(crate) fn normalize<'a, 'b, 'tcx, T>(
|
||||||
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
cause: ObligationCause<'tcx>,
|
cause: ObligationCause<'tcx>,
|
||||||
@ -321,7 +321,7 @@ where
|
|||||||
Normalized { value, obligations }
|
Normalized { value, obligations }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn normalize_to<'a, 'b, 'tcx, T>(
|
pub(crate) fn normalize_to<'a, 'b, 'tcx, T>(
|
||||||
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
cause: ObligationCause<'tcx>,
|
cause: ObligationCause<'tcx>,
|
||||||
@ -335,7 +335,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// As `normalize`, but with a custom depth.
|
/// As `normalize`, but with a custom depth.
|
||||||
pub fn normalize_with_depth<'a, 'b, 'tcx, T>(
|
pub(crate) fn normalize_with_depth<'a, 'b, 'tcx, T>(
|
||||||
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
cause: ObligationCause<'tcx>,
|
cause: ObligationCause<'tcx>,
|
||||||
@ -351,7 +351,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "info", skip(selcx, param_env, cause, obligations))]
|
#[instrument(level = "info", skip(selcx, param_env, cause, obligations))]
|
||||||
pub fn normalize_with_depth_to<'a, 'b, 'tcx, T>(
|
pub(crate) fn normalize_with_depth_to<'a, 'b, 'tcx, T>(
|
||||||
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
cause: ObligationCause<'tcx>,
|
cause: ObligationCause<'tcx>,
|
||||||
@ -371,7 +371,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "info", skip(selcx, param_env, cause, obligations))]
|
#[instrument(level = "info", skip(selcx, param_env, cause, obligations))]
|
||||||
pub fn try_normalize_with_depth_to<'a, 'b, 'tcx, T>(
|
pub(crate) fn try_normalize_with_depth_to<'a, 'b, 'tcx, T>(
|
||||||
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
selcx: &'a mut SelectionContext<'b, 'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
cause: ObligationCause<'tcx>,
|
cause: ObligationCause<'tcx>,
|
||||||
|
Loading…
Reference in New Issue
Block a user