@@ -24,8 +24,6 @@ use crate::clean::{
2424use crate :: core:: DocContext ;
2525use crate :: formats:: item_type:: ItemType ;
2626
27- type Attrs < ' hir > = & ' hir [ ast:: Attribute ] ;
28-
2927/// Attempt to inline a definition into this AST.
3028///
3129/// This function will fetch the definition specified, and if it is
@@ -46,7 +44,7 @@ pub(crate) fn try_inline(
4644 import_def_id : Option < DefId > ,
4745 res : Res ,
4846 name : Symbol ,
49- attrs : Option < Attrs < ' _ > > ,
47+ attrs : Option < & [ ast :: Attribute ] > ,
5048 visited : & mut FxHashSet < DefId > ,
5149) -> Option < Vec < clean:: Item > > {
5250 let did = res. opt_def_id ( ) ?;
@@ -172,7 +170,7 @@ pub(crate) fn try_inline_glob(
172170 }
173171}
174172
175- pub ( crate ) fn load_attrs < ' hir > ( cx : & DocContext < ' hir > , did : DefId ) -> Attrs < ' hir > {
173+ pub ( crate ) fn load_attrs < ' hir > ( cx : & DocContext < ' hir > , did : DefId ) -> & ' hir [ ast :: Attribute ] {
176174 cx. tcx . get_attrs_unchecked ( did)
177175}
178176
@@ -287,7 +285,7 @@ pub(crate) fn build_impls(
287285 cx : & mut DocContext < ' _ > ,
288286 parent_module : Option < DefId > ,
289287 did : DefId ,
290- attrs : Option < Attrs < ' _ > > ,
288+ attrs : Option < & [ ast :: Attribute ] > ,
291289 ret : & mut Vec < clean:: Item > ,
292290) {
293291 let _prof_timer = cx. tcx . sess . prof . generic_activity ( "build_inherent_impls" ) ;
@@ -303,8 +301,8 @@ pub(crate) fn build_impls(
303301pub ( crate ) fn merge_attrs (
304302 cx : & mut DocContext < ' _ > ,
305303 parent_module : Option < DefId > ,
306- old_attrs : Attrs < ' _ > ,
307- new_attrs : Option < Attrs < ' _ > > ,
304+ old_attrs : & [ ast :: Attribute ] ,
305+ new_attrs : Option < & [ ast :: Attribute ] > ,
308306) -> ( clean:: Attributes , Option < Arc < clean:: cfg:: Cfg > > ) {
309307 // NOTE: If we have additional attributes (from a re-export),
310308 // always insert them first. This ensure that re-export
@@ -331,7 +329,7 @@ pub(crate) fn build_impl(
331329 cx : & mut DocContext < ' _ > ,
332330 parent_module : Option < DefId > ,
333331 did : DefId ,
334- attrs : Option < Attrs < ' _ > > ,
332+ attrs : Option < & [ ast :: Attribute ] > ,
335333 ret : & mut Vec < clean:: Item > ,
336334) {
337335 if !cx. inlined . insert ( did. into ( ) ) {
0 commit comments