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: rc_clone_in_vec_init.rs
    path of file: ./repos/rust-clippy/clippy_lints/src
    
    the code of the file until where you have to start completion: use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::higher::VecArgs;
use clippy_utils::last_path_segment;
use clippy_utils::macros::root_macro_call_first_node;
use clippy_utils::source::{indent_of, snippet};
use rustc_errors::Applicability;
use rustc_hir::{Expr, ExprKind, QPath, TyKind};
use rustc_lint::{LateContext, LateLintPass};
use rustc_middle::ty;
use rustc_session::declare_lint_pass;
use rustc_span::{sym, Span, Symbol};

declare_clippy_lint! {
    /// ### What it does
    /// Checks for reference-counted pointers (`Arc`, `Rc`, `rc::Weak`, and `sync::Weak`)
    /// in `vec![elem; len]`
    ///
    /// ### Why is this bad?
    /// This will create `elem` once and clone it `len` times - doing so with `Arc`/`Rc`/`Weak`
    /// is a bit misleading, as it will create ref
    
fn emit_lint(cx: &LateContext<'_>, symbol: Symbol, lint_span: Span, elem: &Expr<'_>, len: &Expr<'_>, func_span: Span) {
    let symbol_name = symbol.as_str();

    span_lint_and_then(
        cx,
        RC_CLONE_IN_VEC_INIT,
        lint_span,
        "initializing a reference-counted pointer in `vec![elem; len]`",
        |diag| {
            let len_snippet = snippet(cx, len.span, "..");
            let elem_snippet = format!("{}(..)", snippet(cx, elem.span.with_hi(func_span.hi()), ".."));
            let indentation = " ".repeat(indent_of(cx, lint_span).unwrap_or(0));
            let loop_init_suggestion = loop_init_suggestion(&elem_snippet, len_snippet.as_ref(), &indentation);
            let extract_suggestion = extract_suggestion(&elem_snippet, len_snippet.as_ref(), &indentation);

            diag.note(format!("each element will point to the same `{symbol_name}` instance"));
            diag.span_suggestion(
                lint_span,
                format!("consider initializing each `{symbol_name}` element individually"),
                loop_init_suggestion,
                Applicability::HasPlaceholders,
            );
            diag.span_suggestion(
                lint_span,
                format!(
                    "or if this is intentional, consider extracting the `{symbol_name}` initialization to a variable"
                ),
                extract_suggestion,
                Applicability::HasPlaceholders,
            );
        },
    );
}