diff --git a/src/librustc/traits/query/type_op/eq.rs b/src/librustc/traits/query/type_op/eq.rs index 7c35f448a312..799e52c6b192 100644 --- a/src/librustc/traits/query/type_op/eq.rs +++ b/src/librustc/traits/query/type_op/eq.rs @@ -27,7 +27,7 @@ impl<'tcx> Eq<'tcx> { impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Eq<'tcx> { type QueryResult = (); - fn prequery(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Eq<'tcx>>) -> Option { + fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Eq<'tcx>>) -> Option { if key.value.a == key.value.b { Some(()) } else { diff --git a/src/librustc/traits/query/type_op/mod.rs b/src/librustc/traits/query/type_op/mod.rs index 191fc1aabb17..8a350d8570d3 100644 --- a/src/librustc/traits/query/type_op/mod.rs +++ b/src/librustc/traits/query/type_op/mod.rs @@ -46,7 +46,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: /// Either converts `self` directly into a `QueryResult` (for /// simple cases) or into a `QueryKey` (for more complex cases /// where we actually have work to do). - fn prequery( + fn try_fast_path( tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>, ) -> Option; @@ -83,7 +83,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: infcx: &InferCtxt<'_, 'gcx, 'tcx>, output_query_region_constraints: &mut Vec>, ) -> Fallible { - if let Some(result) = QueryTypeOp::prequery(infcx.tcx, &query_key) { + if let Some(result) = QueryTypeOp::try_fast_path(infcx.tcx, &query_key) { return Ok(result); } diff --git a/src/librustc/traits/query/type_op/normalize.rs b/src/librustc/traits/query/type_op/normalize.rs index 3491b0b4b4ec..0c393fa4ca80 100644 --- a/src/librustc/traits/query/type_op/normalize.rs +++ b/src/librustc/traits/query/type_op/normalize.rs @@ -34,7 +34,7 @@ where { type QueryResult = T; - fn prequery(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option { + fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option { if !key.value.value.has_projections() { Some(key.value.value) } else { diff --git a/src/librustc/traits/query/type_op/outlives.rs b/src/librustc/traits/query/type_op/outlives.rs index bfb476055c82..e41ae7a72f9c 100644 --- a/src/librustc/traits/query/type_op/outlives.rs +++ b/src/librustc/traits/query/type_op/outlives.rs @@ -31,7 +31,7 @@ where { type QueryResult = DropckOutlivesResult<'tcx>; - fn prequery( + fn try_fast_path( tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>, ) -> Option { diff --git a/src/librustc/traits/query/type_op/prove_predicate.rs b/src/librustc/traits/query/type_op/prove_predicate.rs index dfe640f7431f..4bb7a8f8d52d 100644 --- a/src/librustc/traits/query/type_op/prove_predicate.rs +++ b/src/librustc/traits/query/type_op/prove_predicate.rs @@ -28,7 +28,7 @@ impl<'tcx> ProvePredicate<'tcx> { impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx> { type QueryResult = (); - fn prequery(_tcx: TyCtxt<'_, 'gcx, 'tcx>, _key: &ParamEnvAnd<'tcx, Self>) -> Option { + fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, _key: &ParamEnvAnd<'tcx, Self>) -> Option { None } diff --git a/src/librustc/traits/query/type_op/subtype.rs b/src/librustc/traits/query/type_op/subtype.rs index db535e3dd13d..dc41bb1d6ab6 100644 --- a/src/librustc/traits/query/type_op/subtype.rs +++ b/src/librustc/traits/query/type_op/subtype.rs @@ -30,7 +30,7 @@ impl<'tcx> Subtype<'tcx> { impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Subtype<'tcx> { type QueryResult = (); - fn prequery(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option<()> { + fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option<()> { if key.value.sub == key.value.sup { Some(()) } else {