Remove Attrs type alias
This commit is contained in:
parent
c07a8b4e09
commit
1e005af31b
@ -24,8 +24,6 @@ use crate::clean::{
|
||||
use crate::core::DocContext;
|
||||
use crate::formats::item_type::ItemType;
|
||||
|
||||
type Attrs<'hir> = &'hir [ast::Attribute];
|
||||
|
||||
/// Attempt to inline a definition into this AST.
|
||||
///
|
||||
/// This function will fetch the definition specified, and if it is
|
||||
@ -46,7 +44,7 @@ pub(crate) fn try_inline(
|
||||
import_def_id: Option<DefId>,
|
||||
res: Res,
|
||||
name: Symbol,
|
||||
attrs: Option<Attrs<'_>>,
|
||||
attrs: Option<&[ast::Attribute]>,
|
||||
visited: &mut FxHashSet<DefId>,
|
||||
) -> Option<Vec<clean::Item>> {
|
||||
let did = res.opt_def_id()?;
|
||||
@ -172,7 +170,7 @@ pub(crate) fn try_inline_glob(
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn load_attrs<'hir>(cx: &DocContext<'hir>, did: DefId) -> Attrs<'hir> {
|
||||
pub(crate) fn load_attrs<'hir>(cx: &DocContext<'hir>, did: DefId) -> &'hir [ast::Attribute] {
|
||||
cx.tcx.get_attrs_unchecked(did)
|
||||
}
|
||||
|
||||
@ -287,7 +285,7 @@ pub(crate) fn build_impls(
|
||||
cx: &mut DocContext<'_>,
|
||||
parent_module: Option<DefId>,
|
||||
did: DefId,
|
||||
attrs: Option<Attrs<'_>>,
|
||||
attrs: Option<&[ast::Attribute]>,
|
||||
ret: &mut Vec<clean::Item>,
|
||||
) {
|
||||
let _prof_timer = cx.tcx.sess.prof.generic_activity("build_inherent_impls");
|
||||
@ -303,8 +301,8 @@ pub(crate) fn build_impls(
|
||||
pub(crate) fn merge_attrs(
|
||||
cx: &mut DocContext<'_>,
|
||||
parent_module: Option<DefId>,
|
||||
old_attrs: Attrs<'_>,
|
||||
new_attrs: Option<Attrs<'_>>,
|
||||
old_attrs: &[ast::Attribute],
|
||||
new_attrs: Option<&[ast::Attribute]>,
|
||||
) -> (clean::Attributes, Option<Arc<clean::cfg::Cfg>>) {
|
||||
// NOTE: If we have additional attributes (from a re-export),
|
||||
// always insert them first. This ensure that re-export
|
||||
@ -331,7 +329,7 @@ pub(crate) fn build_impl(
|
||||
cx: &mut DocContext<'_>,
|
||||
parent_module: Option<DefId>,
|
||||
did: DefId,
|
||||
attrs: Option<Attrs<'_>>,
|
||||
attrs: Option<&[ast::Attribute]>,
|
||||
ret: &mut Vec<clean::Item>,
|
||||
) {
|
||||
if !cx.inlined.insert(did.into()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user