@@ -1987,10 +1987,10 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
19871987
19881988 // walk the return type and check for Self (this does not check associated types)
19891989 if let Some ( self_adt) = self_ty. ty_adt_def ( ) {
1990- if contains_adt_constructor ( ret_ty, self_adt) {
1990+ if contains_adt_constructor ( cx . tcx , ret_ty, self_adt) {
19911991 return ;
19921992 }
1993- } else if contains_ty ( ret_ty, self_ty) {
1993+ } else if contains_ty ( cx . tcx , ret_ty, self_ty) {
19941994 return ;
19951995 }
19961996
@@ -2001,10 +2001,10 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
20012001 if let ty:: PredicateKind :: Projection ( projection_predicate) = predicate. kind ( ) . skip_binder ( ) {
20022002 // walk the associated type and check for Self
20032003 if let Some ( self_adt) = self_ty. ty_adt_def ( ) {
2004- if contains_adt_constructor ( projection_predicate. ty , self_adt) {
2004+ if contains_adt_constructor ( cx . tcx , projection_predicate. ty , self_adt) {
20052005 return ;
20062006 }
2007- } else if contains_ty ( projection_predicate. ty , self_ty) {
2007+ } else if contains_ty ( cx . tcx , projection_predicate. ty , self_ty) {
20082008 return ;
20092009 }
20102010 }
@@ -2053,7 +2053,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
20532053 if let TraitItemKind :: Fn ( _, _) = item. kind;
20542054 let ret_ty = return_ty( cx, item. hir_id( ) ) ;
20552055 let self_ty = TraitRef :: identity( cx. tcx, item. def_id. to_def_id( ) ) . self_ty( ) ;
2056- if !contains_ty( ret_ty, self_ty) ;
2056+ if !contains_ty( cx . tcx , ret_ty, self_ty) ;
20572057
20582058 then {
20592059 span_lint(
0 commit comments