@@ -552,42 +552,14 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
552
552
// The result is "true" if the obligation *may* hold and "false" if
553
553
// we can be sure it does not.
554
554
555
- /// Evaluates whether the obligation `obligation` can be satisfied (by any means).
555
+ /// Evaluates whether the obligation `obligation` can be satisfied and returns
556
+ /// an `EvaluationResult`.
556
557
pub fn evaluate_obligation ( & mut self ,
557
558
obligation : & PredicateObligation < ' tcx > )
558
- -> bool
559
- {
560
- debug ! ( "evaluate_obligation({:?})" ,
561
- obligation) ;
562
-
563
- self . probe ( |this, _| {
564
- this. evaluate_predicate_recursively ( TraitObligationStackList :: empty ( ) , obligation)
565
- . may_apply ( )
566
- } )
567
- }
568
-
569
- /// Evaluates whether the obligation `obligation` can be satisfied,
570
- /// and returns `false` if not certain. However, this is not entirely
571
- /// accurate if inference variables are involved.
572
- pub fn evaluate_obligation_conservatively ( & mut self ,
573
- obligation : & PredicateObligation < ' tcx > )
574
- -> bool
559
+ -> EvaluationResult
575
560
{
576
- debug ! ( "evaluate_obligation_conservatively({:?})" ,
577
- obligation) ;
578
-
579
- self . probe ( |this, _| {
580
- this. evaluate_predicate_recursively ( TraitObligationStackList :: empty ( ) , obligation)
581
- == EvaluatedToOk
582
- } )
583
- }
561
+ debug ! ( "evaluate_obligation({:?})" , obligation) ;
584
562
585
- /// Evaluates whether the obligation `obligation` can be satisfied and returns
586
- /// an `EvaluationResult`.
587
- pub fn evaluate_obligation_recursively ( & mut self ,
588
- obligation : & PredicateObligation < ' tcx > )
589
- -> EvaluationResult
590
- {
591
563
self . probe ( |this, _| {
592
564
this. evaluate_predicate_recursively ( TraitObligationStackList :: empty ( ) , obligation)
593
565
} )
0 commit comments