@@ -53,7 +53,7 @@ const ATOMIC_TYPES: [&str; 12] = [
5353] ;
5454
5555fn type_is_atomic ( cx : & LateContext < ' _ , ' _ > , expr : & Expr < ' _ > ) -> bool {
56- if let ty:: Adt ( & ty:: AdtDef { did, .. } , _) = cx. tables . expr_ty ( expr) . kind {
56+ if let ty:: Adt ( & ty:: AdtDef { did, .. } , _) = cx. tables ( ) . expr_ty ( expr) . kind {
5757 ATOMIC_TYPES
5858 . iter ( )
5959 . any ( |ty| match_def_path ( cx, did, & [ "core" , "sync" , "atomic" , ty] ) )
@@ -76,7 +76,7 @@ fn check_atomic_load_store(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
7676 if method == "load" || method == "store" ;
7777 let ordering_arg = if method == "load" { & args[ 1 ] } else { & args[ 2 ] } ;
7878 if let ExprKind :: Path ( ref ordering_qpath) = ordering_arg. kind;
79- if let Some ( ordering_def_id) = cx. tables. qpath_res( ordering_qpath, ordering_arg. hir_id) . opt_def_id( ) ;
79+ if let Some ( ordering_def_id) = cx. tables( ) . qpath_res( ordering_qpath, ordering_arg. hir_id) . opt_def_id( ) ;
8080 then {
8181 if method == "load" &&
8282 match_ordering_def_path( cx, ordering_def_id, & [ "Release" , "AcqRel" ] ) {
@@ -107,12 +107,12 @@ fn check_memory_fence(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
107107 if_chain ! {
108108 if let ExprKind :: Call ( ref func, ref args) = expr. kind;
109109 if let ExprKind :: Path ( ref func_qpath) = func. kind;
110- if let Some ( def_id) = cx. tables. qpath_res( func_qpath, func. hir_id) . opt_def_id( ) ;
110+ if let Some ( def_id) = cx. tables( ) . qpath_res( func_qpath, func. hir_id) . opt_def_id( ) ;
111111 if [ "fence" , "compiler_fence" ]
112112 . iter( )
113113 . any( |func| match_def_path( cx, def_id, & [ "core" , "sync" , "atomic" , func] ) ) ;
114114 if let ExprKind :: Path ( ref ordering_qpath) = & args[ 0 ] . kind;
115- if let Some ( ordering_def_id) = cx. tables. qpath_res( ordering_qpath, args[ 0 ] . hir_id) . opt_def_id( ) ;
115+ if let Some ( ordering_def_id) = cx. tables( ) . qpath_res( ordering_qpath, args[ 0 ] . hir_id) . opt_def_id( ) ;
116116 if match_ordering_def_path( cx, ordering_def_id, & [ "Relaxed" ] ) ;
117117 then {
118118 span_lint_and_help(
0 commit comments