@@ -1763,7 +1763,10 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
17631763 ) => ( pred, item_def_id, span) ,
17641764 _ => return ,
17651765 } ;
1766-
1766+ debug ! (
1767+ "suggest_unsized_bound_if_applicable: pred={:?} item_def_id={:?} span={:?}" ,
1768+ pred, item_def_id, span
1769+ ) ;
17671770 let node = match (
17681771 self . tcx . hir ( ) . get_if_local ( item_def_id) ,
17691772 Some ( pred. def_id ( ) ) == self . tcx . lang_items ( ) . sized_trait ( ) ,
@@ -1775,6 +1778,11 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
17751778 Some ( generics) => generics,
17761779 None => return ,
17771780 } ;
1781+ debug ! ( "suggest_unsized_bound_if_applicable: generics.params={:?}" , generics. params) ;
1782+ debug ! (
1783+ "suggest_unsized_bound_if_applicable: generics.where_clause={:?}" ,
1784+ generics. where_clause
1785+ ) ;
17781786 for param in generics. params {
17791787 if param. span != span
17801788 || param. bounds . iter ( ) . any ( |bound| {
@@ -1784,6 +1792,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
17841792 {
17851793 continue ;
17861794 }
1795+ debug ! ( "suggest_unsized_bound_if_applicable: param={:?}" , param) ;
17871796 match node {
17881797 hir:: Node :: Item (
17891798 item
@@ -1895,6 +1904,7 @@ impl<'v> Visitor<'v> for FindTypeParam {
18951904 if path. segments . len ( ) == 1 && path. segments [ 0 ] . ident . name == self . param =>
18961905 {
18971906 if !self . nested {
1907+ debug ! ( "FindTypeParam::visit_ty: ty={:?}" , ty) ;
18981908 self . invalid_spans . push ( ty. span ) ;
18991909 }
19001910 }
0 commit comments