Skip to content

Commit bca294d

Browse files
committed
rename QueryResult to QueryResponse
`Result` really sounds like the rustc result type
1 parent fd046a2 commit bca294d

20 files changed

+158
-158
lines changed

src/librustc/ich/impls_ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ impl_stable_hash_for!(enum infer::canonical::CanonicalTyVarKind {
12971297
});
12981298

12991299
impl_stable_hash_for!(
1300-
impl<'tcx, R> for struct infer::canonical::QueryResult<'tcx, R> {
1300+
impl<'tcx, R> for struct infer::canonical::QueryResponse<'tcx, R> {
13011301
var_values, region_constraints, certainty, value
13021302
}
13031303
);

src/librustc/infer/canonical/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use ty::{self, CanonicalVar, Lift, Region, List, TyCtxt};
4444

4545
mod canonicalizer;
4646

47-
pub mod query_result;
47+
pub mod query_response;
4848

4949
mod substitute;
5050

@@ -118,10 +118,10 @@ pub enum CanonicalTyVarKind {
118118
}
119119

120120
/// After we execute a query with a canonicalized key, we get back a
121-
/// `Canonical<QueryResult<..>>`. You can use
121+
/// `Canonical<QueryResponse<..>>`. You can use
122122
/// `instantiate_query_result` to access the data in this result.
123123
#[derive(Clone, Debug)]
124-
pub struct QueryResult<'tcx, R> {
124+
pub struct QueryResponse<'tcx, R> {
125125
pub var_values: CanonicalVarValues<'tcx>,
126126
pub region_constraints: Vec<QueryRegionConstraint<'tcx>>,
127127
pub certainty: Certainty,
@@ -130,8 +130,8 @@ pub struct QueryResult<'tcx, R> {
130130

131131
pub type Canonicalized<'gcx, V> = Canonical<'gcx, <V as Lift<'gcx>>::Lifted>;
132132

133-
pub type CanonicalizedQueryResult<'gcx, T> =
134-
Lrc<Canonical<'gcx, QueryResult<'gcx, <T as Lift<'gcx>>::Lifted>>>;
133+
pub type CanonicalizedQueryResponse<'gcx, T> =
134+
Lrc<Canonical<'gcx, QueryResponse<'gcx, <T as Lift<'gcx>>::Lifted>>>;
135135

136136
/// Indicates whether or not we were able to prove the query to be
137137
/// true.
@@ -168,7 +168,7 @@ impl Certainty {
168168
}
169169
}
170170

171-
impl<'tcx, R> QueryResult<'tcx, R> {
171+
impl<'tcx, R> QueryResponse<'tcx, R> {
172172
pub fn is_proven(&self) -> bool {
173173
self.certainty.is_proven()
174174
}
@@ -178,7 +178,7 @@ impl<'tcx, R> QueryResult<'tcx, R> {
178178
}
179179
}
180180

181-
impl<'tcx, R> Canonical<'tcx, QueryResult<'tcx, R>> {
181+
impl<'tcx, R> Canonical<'tcx, QueryResponse<'tcx, R>> {
182182
pub fn is_proven(&self) -> bool {
183183
self.value.is_proven()
184184
}
@@ -351,14 +351,14 @@ BraceStructTypeFoldableImpl! {
351351
}
352352

353353
BraceStructTypeFoldableImpl! {
354-
impl<'tcx, R> TypeFoldable<'tcx> for QueryResult<'tcx, R> {
354+
impl<'tcx, R> TypeFoldable<'tcx> for QueryResponse<'tcx, R> {
355355
var_values, region_constraints, certainty, value
356356
} where R: TypeFoldable<'tcx>,
357357
}
358358

359359
BraceStructLiftImpl! {
360-
impl<'a, 'tcx, R> Lift<'tcx> for QueryResult<'a, R> {
361-
type Lifted = QueryResult<'tcx, R::Lifted>;
360+
impl<'a, 'tcx, R> Lift<'tcx> for QueryResponse<'a, R> {
361+
type Lifted = QueryResponse<'tcx, R::Lifted>;
362362
var_values, region_constraints, certainty, value
363363
} where R: Lift<'tcx>
364364
}

0 commit comments

Comments
 (0)