@@ -28,7 +28,7 @@ pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>
28
28
let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
29
29
if let Some ( attr) = attr {
30
30
check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
31
- } else if is_public && !is_proc_macro ( cx . sess ( ) , attrs) && !attrs. iter ( ) . any ( |a| a. has_name ( sym:: no_mangle) ) {
31
+ } else if is_public && !is_proc_macro ( attrs) && !attrs. iter ( ) . any ( |a| a. has_name ( sym:: no_mangle) ) {
32
32
check_must_use_candidate (
33
33
cx,
34
34
sig. decl ,
@@ -51,7 +51,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
51
51
if let Some ( attr) = attr {
52
52
check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
53
53
} else if is_public
54
- && !is_proc_macro ( cx . sess ( ) , attrs)
54
+ && !is_proc_macro ( attrs)
55
55
&& trait_ref_of_method ( cx, item. owner_id . def_id ) . is_none ( )
56
56
{
57
57
check_must_use_candidate (
@@ -78,7 +78,7 @@ pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Tr
78
78
check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
79
79
} else if let hir:: TraitFn :: Provided ( eid) = * eid {
80
80
let body = cx. tcx . hir ( ) . body ( eid) ;
81
- if attr. is_none ( ) && is_public && !is_proc_macro ( cx . sess ( ) , attrs) {
81
+ if attr. is_none ( ) && is_public && !is_proc_macro ( attrs) {
82
82
check_must_use_candidate (
83
83
cx,
84
84
sig. decl ,
0 commit comments