//! The Rust AST Visitor. Extracts useful information and massages it into a form
//! usable for `clean`.
-use rustc_ast::ast;
+use rustc_ast as ast;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
attrs: &item.attrs,
generics,
fields: sd.fields(),
- whence: item.span,
+ span: item.span,
}
}
attrs: &item.attrs,
generics,
fields: sd.fields(),
- whence: item.span,
+ span: item.span,
}
}
id: v.id,
attrs: &v.attrs,
def: &v.data,
- whence: v.span,
+ span: v.span,
})
.collect(),
vis: &it.vis,
generics,
attrs: &it.attrs,
id: it.hir_id,
- whence: it.span,
+ span: it.span,
}
}
kind,
helpers,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
});
}
None => {
attrs: &item.attrs,
decl,
name,
- whence: item.span,
+ span: item.span,
generics,
header,
body,
path: orig_name.map(|x| x.to_string()),
vis: &item.vis,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
})
}
hir::ItemKind::Use(_, hir::UseKind::ListStem) => {}
attrs: &item.attrs,
path,
glob: is_glob,
- whence: item.span,
+ span: item.span,
});
}
hir::ItemKind::Mod(ref m) => {
name: ident.name,
id: item.hir_id,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.typedefs.push(t);
name: ident.name,
id: item.hir_id,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.opaque_tys.push(t);
id: item.hir_id,
name: ident.name,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.statics.push(s);
id: item.hir_id,
name: ident.name,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.constants.push(s);
bounds,
id: item.hir_id,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.traits.push(t);
bounds,
id: item.hir_id,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.trait_aliases.push(t);
items,
attrs: &item.attrs,
id: item.hir_id,
- whence: item.span,
+ span: item.span,
vis: &item.vis,
};
om.impls.push(i);
kind: &item.kind,
vis: &item.vis,
attrs: &item.attrs,
- whence: item.span,
+ span: item.span,
});
}
def_id: self.cx.tcx.hir().local_def_id(def.hir_id).to_def_id(),
attrs: &def.attrs,
name: renamed.unwrap_or(def.ident.name),
- whence: def.span,
+ span: def.span,
matchers,
imported_from: None,
}