You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: missing_spin_loop.rs
    path of file: ./repos/rust-clippy/clippy_lints/src/loops
    
    the code of the file until where you have to start completion: use super::MISSING_SPIN_LOOP;
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::is_no_std_crate;
use rustc_errors::Applicability;
use rustc_hir::{Block, Expr, ExprKind};
use rustc_lint::LateContext;
use rustc_middle::ty;
use rustc_span::sym;

fn unpack_cond<'tcx>(cond: &'tcx Expr<'tcx>) -> &'tcx Expr<'tcx> {
    match &cond.kind {
        ExprKind::Block(
            Block {
                stmts: [],
                expr: Some(e),
                ..
            },
            _,
        )
        | ExprKind::Unary(_, e) => unpack_cond(e),
        ExprKind::Binary(_, l, r) => {
            let l = unpack_cond(l);
           
    
pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, cond: &'tcx Expr<'_>, body: &'tcx Expr<'_>) {
    if let ExprKind::Block(
        Block {
            stmts: [], expr: None, ..
        },
        _,
    ) = body.kind
        && let ExprKind::MethodCall(method, callee, ..) = unpack_cond(cond).kind
        && [sym::load, sym::compare_exchange, sym::compare_exchange_weak].contains(&method.ident.name)
        && let ty::Adt(def, _args) = cx.typeck_results().expr_ty(callee).kind()
        && cx.tcx.is_diagnostic_item(sym::AtomicBool, def.did())
    {
        span_lint_and_sugg(
            cx,
            MISSING_SPIN_LOOP,
            body.span,
            "busy-waiting loop should at least have a spin loop hint",
            "try",
            (if is_no_std_crate(cx) {
                "{ core::hint::spin_loop() }"
            } else {
                "{ std::hint::spin_loop() }"
            })
            .into(),
            Applicability::MachineApplicable,
        );
    }
}