Move trait into attr so it's greppable
This commit is contained in:
@@ -131,8 +131,8 @@ pub enum GenerateProofTree {
|
||||
Never,
|
||||
}
|
||||
|
||||
#[extension]
|
||||
pub impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
|
||||
#[extension(pub trait InferCtxtEvalExt<'tcx>)]
|
||||
impl<'tcx> InferCtxt<'tcx> {
|
||||
/// Evaluates a goal from **outside** of the trait solver.
|
||||
///
|
||||
/// Using this while inside of the solver is wrong as it uses a new
|
||||
|
||||
@@ -17,8 +17,8 @@ use crate::solve::inspect::ProofTreeBuilder;
|
||||
use crate::traits::StructurallyNormalizeExt;
|
||||
use crate::traits::TraitEngineExt;
|
||||
|
||||
#[extension]
|
||||
pub impl<'tcx> InferCtxtSelectExt<'tcx> for InferCtxt<'tcx> {
|
||||
#[extension(pub trait InferCtxtSelectExt<'tcx>)]
|
||||
impl<'tcx> InferCtxt<'tcx> {
|
||||
fn select_in_new_trait_solver(
|
||||
&self,
|
||||
obligation: &PolyTraitObligation<'tcx>,
|
||||
|
||||
@@ -216,8 +216,8 @@ pub trait ProofTreeVisitor<'tcx> {
|
||||
fn visit_goal(&mut self, goal: &InspectGoal<'_, 'tcx>) -> ControlFlow<Self::BreakTy>;
|
||||
}
|
||||
|
||||
#[extension]
|
||||
pub impl<'tcx> ProofTreeInferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
#[extension(pub trait ProofTreeInferCtxtExt<'tcx>)]
|
||||
impl<'tcx> InferCtxt<'tcx> {
|
||||
fn visit_proof_tree<V: ProofTreeVisitor<'tcx>>(
|
||||
&self,
|
||||
goal: Goal<'tcx, ty::Predicate<'tcx>>,
|
||||
|
||||
@@ -61,8 +61,8 @@ enum GoalEvaluationKind {
|
||||
Nested { is_normalizes_to_hack: IsNormalizesToHack },
|
||||
}
|
||||
|
||||
#[extension]
|
||||
impl<'tcx> CanonicalResponseExt for Canonical<'tcx, Response<'tcx>> {
|
||||
#[extension(trait CanonicalResponseExt)]
|
||||
impl<'tcx> Canonical<'tcx, Response<'tcx>> {
|
||||
fn has_no_inference_or_external_constraints(&self) -> bool {
|
||||
self.value.external_constraints.region_constraints.is_empty()
|
||||
&& self.value.var_values.is_identity()
|
||||
|
||||
Reference in New Issue
Block a user