use rustc_span::hygiene::AstPass;
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::DUMMY_SP;
+use thin_vec::thin_vec;
pub fn inject(
mut krate: ast::Crate,
cx.item(
span,
ident,
- vec![cx.attribute(cx.meta_word(span, sym::macro_use))].into(),
+ thin_vec![cx.attribute(cx.meta_word(span, sym::macro_use))],
ast::ItemKind::ExternCrate(None),
),
);
let use_item = cx.item(
span,
Ident::empty(),
- vec![cx.attribute(cx.meta_word(span, sym::prelude_import))].into(),
+ thin_vec![cx.attribute(cx.meta_word(span, sym::prelude_import))],
ast::ItemKind::Use(ast::UseTree {
prefix: cx.path(span, import_path),
kind: ast::UseTreeKind::Glob,