@@ -1763,7 +1763,10 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
1763
1763
) => ( pred, item_def_id, span) ,
1764
1764
_ => return ,
1765
1765
} ;
1766
-
1766
+ debug ! (
1767
+ "suggest_unsized_bound_if_applicable: pred={:?} item_def_id={:?} span={:?}" ,
1768
+ pred, item_def_id, span
1769
+ ) ;
1767
1770
let node = match (
1768
1771
self . tcx . hir ( ) . get_if_local ( item_def_id) ,
1769
1772
Some ( pred. def_id ( ) ) == self . tcx . lang_items ( ) . sized_trait ( ) ,
@@ -1775,6 +1778,11 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
1775
1778
Some ( generics) => generics,
1776
1779
None => return ,
1777
1780
} ;
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
+ ) ;
1778
1786
for param in generics. params {
1779
1787
if param. span != span
1780
1788
|| param. bounds . iter ( ) . any ( |bound| {
@@ -1784,6 +1792,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
1784
1792
{
1785
1793
continue ;
1786
1794
}
1795
+ debug ! ( "suggest_unsized_bound_if_applicable: param={:?}" , param) ;
1787
1796
match node {
1788
1797
hir:: Node :: Item (
1789
1798
item
@@ -1895,6 +1904,7 @@ impl<'v> Visitor<'v> for FindTypeParam {
1895
1904
if path. segments . len ( ) == 1 && path. segments [ 0 ] . ident . name == self . param =>
1896
1905
{
1897
1906
if !self . nested {
1907
+ debug ! ( "FindTypeParam::visit_ty: ty={:?}" , ty) ;
1898
1908
self . invalid_spans . push ( ty. span ) ;
1899
1909
}
1900
1910
}
0 commit comments