words
This commit is contained in:
@@ -43,7 +43,7 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
|
||||
let c_ty = self.infcx.canonicalize_query(self.param_env.and(ty), &mut orig_values);
|
||||
let span = self.cause.span;
|
||||
debug!("c_ty = {:?}", c_ty);
|
||||
if let Ok(result) = &tcx.dropck_outlives(c_ty) {
|
||||
if let Ok(result) = tcx.dropck_outlives(c_ty) {
|
||||
if result.is_proven() {
|
||||
if let Ok(InferOk { value, obligations }) =
|
||||
self.infcx.instantiate_query_response_and_region_obligations(
|
||||
|
||||
@@ -145,7 +145,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
ty::Projection(ref data) if !data.has_escaping_bound_vars() => {
|
||||
ty::Projection(data) if !data.has_escaping_bound_vars() => {
|
||||
// This is kind of hacky -- we need to be able to
|
||||
// handle normalization within binders because
|
||||
// otherwise we wind up a need to normalize when doing
|
||||
@@ -165,7 +165,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
||||
// so we cannot canonicalize it.
|
||||
let c_data = self
|
||||
.infcx
|
||||
.canonicalize_hr_query_hack(self.param_env.and(*data), &mut orig_values);
|
||||
.canonicalize_hr_query_hack(self.param_env.and(data), &mut orig_values);
|
||||
debug!("QueryNormalizer: c_data = {:#?}", c_data);
|
||||
debug!("QueryNormalizer: orig_values = {:#?}", orig_values);
|
||||
match tcx.normalize_projection_ty(c_data) {
|
||||
@@ -180,7 +180,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
||||
self.cause,
|
||||
self.param_env,
|
||||
&orig_values,
|
||||
&result,
|
||||
result,
|
||||
) {
|
||||
Ok(InferOk { value: result, obligations }) => {
|
||||
debug!("QueryNormalizer: result = {:#?}", result);
|
||||
|
||||
@@ -68,7 +68,7 @@ impl<'cx, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'cx, 'tcx> {
|
||||
&ObligationCause::misc(span, body_id),
|
||||
param_env,
|
||||
&orig_values,
|
||||
&result,
|
||||
result,
|
||||
);
|
||||
debug!("implied_outlives_bounds for {:?}: {:#?}", ty, result);
|
||||
let result = match result {
|
||||
|
||||
@@ -81,16 +81,14 @@ pub trait QueryTypeOp<'tcx>: fmt::Debug + Sized + TypeFoldable<'tcx> + 'tcx {
|
||||
// like the subtype query, which go awry around
|
||||
// `'static` otherwise.
|
||||
let mut canonical_var_values = OriginalQueryValues::default();
|
||||
let canonical_self =
|
||||
infcx.canonicalize_hr_query_hack(query_key.clone(), &mut canonical_var_values);
|
||||
let old_param_env = query_key.param_env;
|
||||
let canonical_self = infcx.canonicalize_hr_query_hack(query_key, &mut canonical_var_values);
|
||||
let canonical_result = Self::perform_query(infcx.tcx, canonical_self)?;
|
||||
|
||||
let param_env = query_key.param_env;
|
||||
|
||||
let InferOk { value, obligations } = infcx
|
||||
.instantiate_nll_query_response_and_region_obligations(
|
||||
&ObligationCause::dummy(),
|
||||
param_env,
|
||||
old_param_env,
|
||||
&canonical_var_values,
|
||||
canonical_result,
|
||||
output_query_region_constraints,
|
||||
|
||||
Reference in New Issue
Block a user