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: match_on_vec_items.rs
    path of file: ./repos/rust-clippy/clippy_lints/src/matches
    
    the code of the file until where you have to start completion: use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet;
use clippy_utils::ty::{is_type_diagnostic_item, is_type_lang_item};
use rustc_errors::Applicability;
use rustc_hir::{Expr, ExprKind, LangItem};
use rustc_lint::LateContext;
use rustc_span::sym;

use super:
    
pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, scrutinee: &'tcx Expr<'_>) {
    if let Some(idx_expr) = is_vec_indexing(cx, scrutinee)
        && let ExprKind::Index(vec, idx, _) = idx_expr.kind
    {
        // FIXME: could be improved to suggest surrounding every pattern with Some(_),
        // but only when `or_patterns` are stabilized.
        span_lint_and_sugg(
            cx,
            MATCH_ON_VEC_ITEMS,
            scrutinee.span,
            "indexing into a vector may panic",
            "try",
            format!("{}.get({})", snippet(cx, vec.span, ".."), snippet(cx, idx.span, "..")),
            Applicability::MaybeIncorrect,
        );
    }
}