@@ -552,42 +552,14 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
552552 // The result is "true" if the obligation *may* hold and "false" if
553553 // we can be sure it does not.
554554
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`.
556557 pub fn evaluate_obligation ( & mut self ,
557558 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
575560 {
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) ;
584562
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- {
591563 self . probe ( |this, _| {
592564 this. evaluate_predicate_recursively ( TraitObligationStackList :: empty ( ) , obligation)
593565 } )
0 commit comments