@@ -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 ) ;
@@ -308,24 +308,24 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
308308
309309 fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx hir:: ImplItem < ' _ > ) {
310310 if let hir:: ImplItemKind :: Fn ( ref sig, ref body_id) = item. kind {
311- let is_public = cx. access_levels . is_exported ( item. hir_id ) ;
311+ let is_public = cx. access_levels . is_exported ( item. hir_id ( ) ) ;
312312 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
313- if is_public && trait_ref_of_method ( cx, item. hir_id ) . is_none ( ) {
313+ if is_public && trait_ref_of_method ( cx, item. hir_id ( ) ) . is_none ( ) {
314314 check_result_unit_err ( cx, & sig. decl , item. span , fn_header_span) ;
315315 }
316316 let attr = must_use_attr ( & item. attrs ) ;
317317 if let Some ( attr) = attr {
318- check_needless_must_use ( cx, & sig. decl , item. hir_id , item. span , fn_header_span, attr) ;
318+ check_needless_must_use ( cx, & sig. decl , item. hir_id ( ) , item. span , fn_header_span, attr) ;
319319 } else if is_public
320320 && !is_proc_macro ( cx. sess ( ) , & item. attrs )
321- && trait_ref_of_method ( cx, item. hir_id ) . is_none ( )
321+ && trait_ref_of_method ( cx, item. hir_id ( ) ) . is_none ( )
322322 {
323323 check_must_use_candidate (
324324 cx,
325325 & sig. decl ,
326326 cx. tcx . hir ( ) . body ( * body_id) ,
327327 item. span ,
328- item. hir_id ,
328+ item. hir_id ( ) ,
329329 item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ,
330330 "this method could have a `#[must_use]` attribute" ,
331331 ) ;
@@ -339,27 +339,27 @@ impl<'tcx> LateLintPass<'tcx> for Functions {
339339 if sig. header . abi == Abi :: Rust {
340340 self . check_arg_number ( cx, & sig. decl , item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ) ;
341341 }
342- let is_public = cx. access_levels . is_exported ( item. hir_id ) ;
342+ let is_public = cx. access_levels . is_exported ( item. hir_id ( ) ) ;
343343 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
344344 if is_public {
345345 check_result_unit_err ( cx, & sig. decl , item. span , fn_header_span) ;
346346 }
347347
348348 let attr = must_use_attr ( & item. attrs ) ;
349349 if let Some ( attr) = attr {
350- check_needless_must_use ( cx, & sig. decl , item. hir_id , item. span , fn_header_span, attr) ;
350+ check_needless_must_use ( cx, & sig. decl , item. hir_id ( ) , item. span , fn_header_span, attr) ;
351351 }
352352 if let hir:: TraitFn :: Provided ( eid) = * eid {
353353 let body = cx. tcx . hir ( ) . body ( eid) ;
354- Self :: check_raw_ptr ( cx, sig. header . unsafety , & sig. decl , body, item. hir_id ) ;
354+ Self :: check_raw_ptr ( cx, sig. header . unsafety , & sig. decl , body, item. hir_id ( ) ) ;
355355
356356 if attr. is_none ( ) && is_public && !is_proc_macro ( cx. sess ( ) , & item. attrs ) {
357357 check_must_use_candidate (
358358 cx,
359359 & sig. decl ,
360360 body,
361361 item. span ,
362- item. hir_id ,
362+ item. hir_id ( ) ,
363363 item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ,
364364 "this method could have a `#[must_use]` attribute" ,
365365 ) ;
0 commit comments