exhaustively destructure external constraints
This commit is contained in:
parent
9af6fee87d
commit
7097dbc50c
1 changed files with 11 additions and 3 deletions
|
@ -48,12 +48,20 @@ enum GoalEvaluationKind {
|
||||||
Nested,
|
Nested,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME(trait-system-refactor-initiative#117): we don't detect whether a response
|
||||||
|
// ended up pulling down any universes.
|
||||||
fn has_no_inference_or_external_constraints<I: Interner>(
|
fn has_no_inference_or_external_constraints<I: Interner>(
|
||||||
response: ty::Canonical<I, Response<I>>,
|
response: ty::Canonical<I, Response<I>>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
response.value.external_constraints.region_constraints.is_empty()
|
let ExternalConstraintsData {
|
||||||
&& response.value.var_values.is_identity()
|
ref region_constraints,
|
||||||
&& response.value.external_constraints.opaque_types.is_empty()
|
ref opaque_types,
|
||||||
|
ref normalization_nested_goals,
|
||||||
|
} = *response.value.external_constraints;
|
||||||
|
response.value.var_values.is_identity()
|
||||||
|
&& region_constraints.is_empty()
|
||||||
|
&& opaque_types.is_empty()
|
||||||
|
&& normalization_nested_goals.is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, D, I> EvalCtxt<'a, D>
|
impl<'a, D, I> EvalCtxt<'a, D>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue