@@ -28,7 +28,7 @@ pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>
2828 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
2929 if let Some ( attr) = attr {
3030 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) ) {
3232 check_must_use_candidate (
3333 cx,
3434 sig. decl ,
@@ -51,7 +51,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
5151 if let Some ( attr) = attr {
5252 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
5353 } else if is_public
54- && !is_proc_macro ( cx . sess ( ) , attrs)
54+ && !is_proc_macro ( attrs)
5555 && trait_ref_of_method ( cx, item. owner_id . def_id ) . is_none ( )
5656 {
5757 check_must_use_candidate (
@@ -78,7 +78,7 @@ pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Tr
7878 check_needless_must_use ( cx, sig. decl , item. owner_id , item. span , fn_header_span, attr) ;
7979 } else if let hir:: TraitFn :: Provided ( eid) = * eid {
8080 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) {
8282 check_must_use_candidate (
8383 cx,
8484 sig. decl ,
0 commit comments