about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-06-27 15:39:20 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-06-27 15:45:53 -0400
commit5fd3b2628087f254de51074bede5f17765dc1373 (patch)
tree543aa68c72040a5286697faf16b5da15b527ce8f
parent0a0dae0964ee64c9c095f0ab891f0df4a412a253 (diff)
downloadrust-5fd3b2628087f254de51074bede5f17765dc1373.tar.gz
rust-5fd3b2628087f254de51074bede5f17765dc1373.zip
rename `prequery` to `try_fast_path`
-rw-r--r--src/librustc/traits/query/type_op/eq.rs2
-rw-r--r--src/librustc/traits/query/type_op/mod.rs4
-rw-r--r--src/librustc/traits/query/type_op/normalize.rs2
-rw-r--r--src/librustc/traits/query/type_op/outlives.rs2
-rw-r--r--src/librustc/traits/query/type_op/prove_predicate.rs2
-rw-r--r--src/librustc/traits/query/type_op/subtype.rs2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc/traits/query/type_op/eq.rs b/src/librustc/traits/query/type_op/eq.rs
index 7c35f448a31..799e52c6b19 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<Self::QueryResult> {
+    fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Eq<'tcx>>) -> Option<Self::QueryResult> {
         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 191fc1aabb1..8a350d8570d 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<Self::QueryResult>;
@@ -83,7 +83,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>:
         infcx: &InferCtxt<'_, 'gcx, 'tcx>,
         output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>,
     ) -> Fallible<Self::QueryResult> {
-        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 3491b0b4b4e..0c393fa4ca8 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<T> {
+    fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option<T> {
         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 bfb476055c8..e41ae7a72f9 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<Self::QueryResult> {
diff --git a/src/librustc/traits/query/type_op/prove_predicate.rs b/src/librustc/traits/query/type_op/prove_predicate.rs
index dfe640f7431..4bb7a8f8d52 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<Self::QueryResult> {
+    fn try_fast_path(_tcx: TyCtxt<'_, 'gcx, 'tcx>, _key: &ParamEnvAnd<'tcx, Self>) -> Option<Self::QueryResult> {
         None
     }
 
diff --git a/src/librustc/traits/query/type_op/subtype.rs b/src/librustc/traits/query/type_op/subtype.rs
index db535e3dd13..dc41bb1d6ab 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 {