self.exact_paths.entry(did).or_insert_with(|| def_id_to_path(tcx, did));
}
- pub fn visit(mut self, krate: &'tcx hir::Crate) -> Module<'tcx> {
+ pub fn visit(mut self, krate: &'tcx hir::Crate<'_>) -> Module<'tcx> {
let mut module = self.visit_mod_contents(
krate.item.span,
krate.item.attrs,
fn visit_variant_data(
&mut self,
- item: &'tcx hir::Item,
+ item: &'tcx hir::Item<'_>,
name: Symbol,
- sd: &'tcx hir::VariantData,
- generics: &'tcx hir::Generics,
+ sd: &'tcx hir::VariantData<'_>,
+ generics: &'tcx hir::Generics<'_>,
) -> Struct<'tcx> {
debug!("visiting struct");
let struct_type = struct_type_from_def(&*sd);
fn visit_union_data(
&mut self,
- item: &'tcx hir::Item,
+ item: &'tcx hir::Item<'_>,
name: Symbol,
- sd: &'tcx hir::VariantData,
- generics: &'tcx hir::Generics,
+ sd: &'tcx hir::VariantData<'_>,
+ generics: &'tcx hir::Generics<'_>,
) -> Union<'tcx> {
debug!("visiting union");
let struct_type = struct_type_from_def(&*sd);
fn visit_enum_def(
&mut self,
- it: &'tcx hir::Item,
+ it: &'tcx hir::Item<'_>,
name: Symbol,
- def: &'tcx hir::EnumDef,
- generics: &'tcx hir::Generics,
+ def: &'tcx hir::EnumDef<'_>,
+ generics: &'tcx hir::Generics<'_>,
) -> Enum<'tcx> {
debug!("visiting enum");
Enum {
fn visit_fn(
&mut self,
om: &mut Module<'tcx>,
- item: &'tcx hir::Item,
+ item: &'tcx hir::Item<'_>,
name: Symbol,
- decl: &'tcx hir::FnDecl,
+ decl: &'tcx hir::FnDecl<'_>,
header: hir::FnHeader,
- generics: &'tcx hir::Generics,
+ generics: &'tcx hir::Generics<'_>,
body: hir::BodyId,
) {
debug!("visiting fn");
&mut self,
span: Span,
attrs: &'tcx [ast::Attribute],
- vis: &'tcx hir::Visibility,
+ vis: &'tcx hir::Visibility<'_>,
id: hir::HirId,
m: &'tcx hir::Mod<'tcx>,
name: Option<Symbol>,
ret
}
- fn visit_item(&mut self, item: &'tcx hir::Item, renamed: Option<Ident>, om: &mut Module<'tcx>) {
+ fn visit_item(
+ &mut self,
+ item: &'tcx hir::Item<'_>,
+ renamed: Option<Ident>,
+ om: &mut Module<'tcx>,
+ ) {
debug!("visiting item {:?}", item);
let ident = renamed.unwrap_or(item.ident);
fn visit_foreign_item(
&mut self,
- item: &'tcx hir::ForeignItem,
+ item: &'tcx hir::ForeignItem<'_>,
renamed: Option<Ident>,
om: &mut Module<'tcx>,
) {
}
// Convert each `exported_macro` into a doc item.
- fn visit_local_macro(&self, def: &'tcx hir::MacroDef, renamed: Option<Symbol>) -> Macro<'tcx> {
+ fn visit_local_macro(
+ &self,
+ def: &'tcx hir::MacroDef<'_>,
+ renamed: Option<Symbol>,
+ ) -> Macro<'tcx> {
debug!("visit_local_macro: {}", def.ident);
let tts = def.ast.body.inner_tokens().trees().collect::<Vec<_>>();
// Extract the spans of all matchers. They represent the "interface" of the macro.