@@ -283,13 +283,13 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
283283 fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' _ > ) {
284284 let attr = must_use_attr ( & item. attrs ) ;
285285 if let hir:: ItemKind :: Fn ( ref sig, ref _generics, ref body_id) = item. kind {
286- let is_public = cx. access_levels . is_exported ( item. hir_id ) ;
286+ let is_public = cx. access_levels . is_exported ( item. hir_id ( ) ) ;
287287 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
288288 if is_public {
289289 check_result_unit_err ( cx, & sig. decl , item. span , fn_header_span) ;
290290 }
291291 if let Some ( attr) = attr {
292- check_needless_must_use ( cx, & sig. decl , item. hir_id , item. span , fn_header_span, attr) ;
292+ check_needless_must_use ( cx, & sig. decl , item. hir_id ( ) , item. span , fn_header_span, attr) ;
293293 return ;
294294 }
295295 if is_public && !is_proc_macro ( cx. sess ( ) , & item. attrs ) && attr_by_name ( & item. attrs , "no_mangle" ) . is_none ( ) {
@@ -298,7 +298,7 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
298298 & sig. decl ,
299299 cx. tcx . hir ( ) . body ( * body_id) ,
300300 item. span ,
301- item. hir_id ,
301+ item. hir_id ( ) ,
302302 item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ,
303303 "this function could have a `#[must_use]` attribute" ,
304304 ) ;
0 commit comments