@@ -256,7 +256,6 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
256256 return ;
257257 }
258258
259- // TODO: forall
260259 match obligation. predicate . ignore_qualifiers ( tcx) . skip_binder ( ) . kind ( ) {
261260 ty:: PredicateKind :: ForAll ( _) => {
262261 bug ! ( "unexpected predicate: {:?}" , obligation. predicate)
@@ -1481,7 +1480,6 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
14811480 return ;
14821481 }
14831482
1484- // TODO: forall
14851483 let mut err = match predicate. ignore_qualifiers ( self . tcx ) . skip_binder ( ) . kind ( ) {
14861484 & ty:: PredicateKind :: Trait ( data, _) => {
14871485 let trait_ref = ty:: Binder :: bind ( data. trait_ref ) ;
@@ -1583,8 +1581,6 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
15831581 }
15841582
15851583 ty:: PredicateKind :: WellFormed ( arg) => {
1586- // TODO: forall
1587-
15881584 // Same hacky approach as above to avoid deluging user
15891585 // with error messages.
15901586 if arg. references_error ( ) || self . tcx . sess . has_errors ( ) {
@@ -1604,7 +1600,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
16041600 }
16051601 }
16061602
1607- ty:: PredicateKind :: Subtype ( ref data) => {
1603+ ty:: PredicateKind :: Subtype ( data) => {
16081604 if data. references_error ( ) || self . tcx . sess . has_errors ( ) {
16091605 // no need to overload user in such cases
16101606 return ;
@@ -1737,14 +1733,16 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
17371733 err : & mut DiagnosticBuilder < ' tcx > ,
17381734 obligation : & PredicateObligation < ' tcx > ,
17391735 ) {
1740- let ( pred, item_def_id, span) =
1741- match ( obligation. predicate . ignore_qualifiers ( self . tcx ) . skip_binder ( ) . kind ( ) , obligation. cause . code . peel_derives ( ) ) {
1742- (
1743- ty:: PredicateKind :: Trait ( pred, _) ,
1744- & ObligationCauseCode :: BindingObligation ( item_def_id, span) ,
1745- ) => ( pred, item_def_id, span) ,
1746- _ => return ,
1747- } ;
1736+ let ( pred, item_def_id, span) = match (
1737+ obligation. predicate . ignore_qualifiers ( self . tcx ) . skip_binder ( ) . kind ( ) ,
1738+ obligation. cause . code . peel_derives ( ) ,
1739+ ) {
1740+ (
1741+ ty:: PredicateKind :: Trait ( pred, _) ,
1742+ & ObligationCauseCode :: BindingObligation ( item_def_id, span) ,
1743+ ) => ( pred, item_def_id, span) ,
1744+ _ => return ,
1745+ } ;
17481746
17491747 let node = match (
17501748 self . tcx . hir ( ) . get_if_local ( item_def_id) ,
0 commit comments