mirror of https://github.com/rust-lang/rust.git
exhaustively destructure external constraints
This commit is contained in:
parent
9af6fee87d
commit
7097dbc50c
|
@ -48,12 +48,20 @@ enum GoalEvaluationKind {
|
|||
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>(
|
||||
response: ty::Canonical<I, Response<I>>,
|
||||
) -> bool {
|
||||
response.value.external_constraints.region_constraints.is_empty()
|
||||
&& response.value.var_values.is_identity()
|
||||
&& response.value.external_constraints.opaque_types.is_empty()
|
||||
let ExternalConstraintsData {
|
||||
ref region_constraints,
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue