use rustc_span::symbol::{kw, sym, Symbol};
use crate::clean::{
- self, utils, Attributes, AttributesExt, FakeDefId, GetDefId, NestedAttributesExt, Type,
+ self, utils, Attributes, AttributesExt, GetDefId, ItemId, NestedAttributesExt, Type,
};
use crate::core::DocContext;
use crate::formats::item_type::ItemType;
}
if let Res::PrimTy(p) = item.res {
// Primitive types can't be inlined so generate an import instead.
+ let prim_ty = clean::PrimitiveType::from(p);
items.push(clean::Item {
name: None,
attrs: box clean::Attributes::default(),
- def_id: FakeDefId::new_fake(did.krate),
+ def_id: ItemId::Primitive(prim_ty, did.krate),
visibility: clean::Public,
kind: box clean::ImportItem(clean::Import::new_simple(
item.ident.name,
global: false,
res: item.res,
segments: vec![clean::PathSegment {
- name: clean::PrimitiveType::from(p).as_sym(),
+ name: prim_ty.as_sym(),
args: clean::GenericArgs::AngleBracketed {
args: Vec::new(),
bindings: Vec::new(),
let source = format!(
"macro_rules! {} {{\n{}}}",
- name.clean(cx),
+ name,
utils::render_macro_arms(matchers, ";")
);