Skip to content

Commit cfbf62f

Browse files
committed
add Goal::CannotProve and extract ProgramClause struct
1 parent c8a5285 commit cfbf62f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/librustc/ich/impls_ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for traits::Goal<'tcx> {
14131413
quantifier.hash_stable(hcx, hasher);
14141414
goal.hash_stable(hcx, hasher);
14151415
},
1416+
CannotProve => { },
14161417
}
14171418
}
14181419
}

src/librustc/traits/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ pub enum Goal<'tcx> {
286286
And(&'tcx Goal<'tcx>, &'tcx Goal<'tcx>),
287287
Not(&'tcx Goal<'tcx>),
288288
DomainGoal(DomainGoal<'tcx>),
289-
Quantified(QuantifierKind, ty::Binder<&'tcx Goal<'tcx>>)
289+
Quantified(QuantifierKind, ty::Binder<&'tcx Goal<'tcx>>),
290+
CannotProve,
290291
}
291292

292293
impl<'tcx> Goal<'tcx> {

src/librustc/traits/structural_impls.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ impl<'tcx> fmt::Display for traits::Goal<'tcx> {
491491
// FIXME: appropriate binder names
492492
write!(fmt, "{}<> {{ {} }}", qkind, goal.skip_binder())
493493
}
494+
CannotProve => write!(fmt, "CannotProve"),
494495
}
495496
}
496497
}
@@ -557,6 +558,7 @@ EnumTypeFoldableImpl! {
557558
(traits::Goal::Not)(goal),
558559
(traits::Goal::DomainGoal)(domain_goal),
559560
(traits::Goal::Quantified)(qkind, goal),
561+
(traits::Goal::CannotProve),
560562
}
561563
}
562564

0 commit comments

Comments
 (0)