pub generics: &'hir hir::Generics<'hir>,
pub attrs: &'hir [ast::Attribute],
pub fields: &'hir [hir::StructField<'hir>],
- pub whence: Span,
+ pub span: Span,
}
pub struct Union<'hir> {
pub generics: &'hir hir::Generics<'hir>,
pub attrs: &'hir [ast::Attribute],
pub fields: &'hir [hir::StructField<'hir>],
- pub whence: Span,
+ pub span: Span,
}
pub struct Enum<'hir> {
pub generics: &'hir hir::Generics<'hir>,
pub attrs: &'hir [ast::Attribute],
pub id: hir::HirId,
- pub whence: Span,
+ pub span: Span,
pub name: Symbol,
}
pub id: hir::HirId,
pub attrs: &'hir [ast::Attribute],
pub def: &'hir hir::VariantData<'hir>,
- pub whence: Span,
+ pub span: Span,
}
pub struct Function<'hir> {
pub name: Symbol,
pub vis: &'hir hir::Visibility<'hir>,
pub header: hir::FnHeader,
- pub whence: Span,
+ pub span: Span,
pub generics: &'hir hir::Generics<'hir>,
pub body: hir::BodyId,
}
pub name: Symbol,
pub id: hir::HirId,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
pub vis: &'hir hir::Visibility<'hir>,
}
pub name: Symbol,
pub id: hir::HirId,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
pub vis: &'hir hir::Visibility<'hir>,
}
pub attrs: &'hir [ast::Attribute],
pub vis: &'hir hir::Visibility<'hir>,
pub id: hir::HirId,
- pub whence: Span,
+ pub span: Span,
}
pub struct Constant<'hir> {
pub attrs: &'hir [ast::Attribute],
pub vis: &'hir hir::Visibility<'hir>,
pub id: hir::HirId,
- pub whence: Span,
+ pub span: Span,
}
pub struct Trait<'hir> {
pub bounds: &'hir [hir::GenericBound<'hir>],
pub attrs: &'hir [ast::Attribute],
pub id: hir::HirId,
- pub whence: Span,
+ pub span: Span,
pub vis: &'hir hir::Visibility<'hir>,
}
pub bounds: &'hir [hir::GenericBound<'hir>],
pub attrs: &'hir [ast::Attribute],
pub id: hir::HirId,
- pub whence: Span,
+ pub span: Span,
pub vis: &'hir hir::Visibility<'hir>,
}
pub for_: &'hir hir::Ty<'hir>,
pub items: Vec<&'hir hir::ImplItem<'hir>>,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
pub vis: &'hir hir::Visibility<'hir>,
pub id: hir::HirId,
}
pub name: Symbol,
pub kind: &'hir hir::ForeignItemKind<'hir>,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
}
// For Macro we store the DefId instead of the NodeId, since we also create
pub hid: hir::HirId,
pub def_id: hir::def_id::DefId,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
pub matchers: Vec<Span>,
pub imported_from: Option<Symbol>,
}
pub path: Option<String>,
pub vis: &'hir hir::Visibility<'hir>,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
}
pub struct Import<'hir> {
pub attrs: &'hir [ast::Attribute],
pub path: &'hir hir::Path<'hir>,
pub glob: bool,
- pub whence: Span,
+ pub span: Span,
}
pub struct ProcMacro<'hir> {
pub kind: MacroKind,
pub helpers: Vec<Symbol>,
pub attrs: &'hir [ast::Attribute],
- pub whence: Span,
+ pub span: Span,
}
pub fn struct_type_from_def(vdata: &hir::VariantData<'_>) -> StructType {