@@ -61,7 +61,7 @@ mod zst_offset;
61
61
62
62
use bind_instead_of_map:: BindInsteadOfMap ;
63
63
use clippy_utils:: diagnostics:: { span_lint, span_lint_and_help} ;
64
- use clippy_utils:: ty:: { contains_adt , contains_ty, implements_trait, is_copy, is_type_diagnostic_item} ;
64
+ use clippy_utils:: ty:: { contains_adt_constructor , contains_ty, implements_trait, is_copy, is_type_diagnostic_item} ;
65
65
use clippy_utils:: {
66
66
contains_return, get_trait_def_id, in_macro, iter_input_pats, match_qpath, method_calls, paths, return_ty,
67
67
SpanlessEq ,
@@ -1919,7 +1919,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
1919
1919
1920
1920
// walk the return type and check for Self (this does not check associated types)
1921
1921
if let Some ( self_adt) = self_ty. ty_adt_def ( ) {
1922
- if contains_adt ( ret_ty, self_adt) {
1922
+ if contains_adt_constructor ( ret_ty, self_adt) {
1923
1923
return ;
1924
1924
}
1925
1925
} else if contains_ty ( ret_ty, self_ty) {
@@ -1933,7 +1933,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
1933
1933
if let ty:: PredicateKind :: Projection ( projection_predicate) = predicate. kind ( ) . skip_binder ( ) {
1934
1934
// walk the associated type and check for Self
1935
1935
if let Some ( self_adt) = self_ty. ty_adt_def ( ) {
1936
- if contains_adt ( projection_predicate. ty , self_adt) {
1936
+ if contains_adt_constructor ( projection_predicate. ty , self_adt) {
1937
1937
return ;
1938
1938
}
1939
1939
} else if contains_ty ( projection_predicate. ty , self_ty) {
0 commit comments