@@ -24,8 +24,6 @@ use crate::clean::{
24
24
use crate :: core:: DocContext ;
25
25
use crate :: formats:: item_type:: ItemType ;
26
26
27
- type Attrs < ' hir > = & ' hir [ ast:: Attribute ] ;
28
-
29
27
/// Attempt to inline a definition into this AST.
30
28
///
31
29
/// This function will fetch the definition specified, and if it is
@@ -46,7 +44,7 @@ pub(crate) fn try_inline(
46
44
import_def_id : Option < DefId > ,
47
45
res : Res ,
48
46
name : Symbol ,
49
- attrs : Option < Attrs < ' _ > > ,
47
+ attrs : Option < & [ ast :: Attribute ] > ,
50
48
visited : & mut FxHashSet < DefId > ,
51
49
) -> Option < Vec < clean:: Item > > {
52
50
let did = res. opt_def_id ( ) ?;
@@ -172,7 +170,7 @@ pub(crate) fn try_inline_glob(
172
170
}
173
171
}
174
172
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 ] {
176
174
cx. tcx . get_attrs_unchecked ( did)
177
175
}
178
176
@@ -287,7 +285,7 @@ pub(crate) fn build_impls(
287
285
cx : & mut DocContext < ' _ > ,
288
286
parent_module : Option < DefId > ,
289
287
did : DefId ,
290
- attrs : Option < Attrs < ' _ > > ,
288
+ attrs : Option < & [ ast :: Attribute ] > ,
291
289
ret : & mut Vec < clean:: Item > ,
292
290
) {
293
291
let _prof_timer = cx. tcx . sess . prof . generic_activity ( "build_inherent_impls" ) ;
@@ -303,8 +301,8 @@ pub(crate) fn build_impls(
303
301
pub ( crate ) fn merge_attrs (
304
302
cx : & mut DocContext < ' _ > ,
305
303
parent_module : Option < DefId > ,
306
- old_attrs : Attrs < ' _ > ,
307
- new_attrs : Option < Attrs < ' _ > > ,
304
+ old_attrs : & [ ast :: Attribute ] ,
305
+ new_attrs : Option < & [ ast :: Attribute ] > ,
308
306
) -> ( clean:: Attributes , Option < Arc < clean:: cfg:: Cfg > > ) {
309
307
// NOTE: If we have additional attributes (from a re-export),
310
308
// always insert them first. This ensure that re-export
@@ -331,7 +329,7 @@ pub(crate) fn build_impl(
331
329
cx : & mut DocContext < ' _ > ,
332
330
parent_module : Option < DefId > ,
333
331
did : DefId ,
334
- attrs : Option < Attrs < ' _ > > ,
332
+ attrs : Option < & [ ast :: Attribute ] > ,
335
333
ret : & mut Vec < clean:: Item > ,
336
334
) {
337
335
if !cx. inlined . insert ( did. into ( ) ) {
0 commit comments