@@ -38,7 +38,7 @@ type Attrs<'hir> = &'hir [ast::Attribute];
38
38
/// and `Some` of a vector of items if it was successfully expanded.
39
39
///
40
40
/// `parent_module` refers to the parent of the *re-export*, not the original item.
41
- crate fn try_inline (
41
+ pub ( crate ) fn try_inline (
42
42
cx : & mut DocContext < ' _ > ,
43
43
parent_module : DefId ,
44
44
import_def_id : Option < DefId > ,
@@ -134,7 +134,7 @@ crate fn try_inline(
134
134
Some ( ret)
135
135
}
136
136
137
- crate fn try_inline_glob (
137
+ pub ( crate ) fn try_inline_glob (
138
138
cx : & mut DocContext < ' _ > ,
139
139
res : Res ,
140
140
visited : & mut FxHashSet < DefId > ,
@@ -154,15 +154,15 @@ crate fn try_inline_glob(
154
154
}
155
155
}
156
156
157
- crate fn load_attrs < ' hir > ( cx : & DocContext < ' hir > , did : DefId ) -> Attrs < ' hir > {
157
+ pub ( crate ) fn load_attrs < ' hir > ( cx : & DocContext < ' hir > , did : DefId ) -> Attrs < ' hir > {
158
158
cx. tcx . get_attrs_unchecked ( did)
159
159
}
160
160
161
161
/// Record an external fully qualified name in the external_paths cache.
162
162
///
163
163
/// These names are used later on by HTML rendering to generate things like
164
164
/// source links back to the original item.
165
- crate fn record_extern_fqn ( cx : & mut DocContext < ' _ > , did : DefId , kind : ItemType ) {
165
+ pub ( crate ) fn record_extern_fqn ( cx : & mut DocContext < ' _ > , did : DefId , kind : ItemType ) {
166
166
let crate_name = cx. tcx . crate_name ( did. krate ) ;
167
167
168
168
let relative =
@@ -190,7 +190,7 @@ crate fn record_extern_fqn(cx: &mut DocContext<'_>, did: DefId, kind: ItemType)
190
190
}
191
191
}
192
192
193
- crate fn build_external_trait ( cx : & mut DocContext < ' _ > , did : DefId ) -> clean:: Trait {
193
+ pub ( crate ) fn build_external_trait ( cx : & mut DocContext < ' _ > , did : DefId ) -> clean:: Trait {
194
194
let trait_items = cx
195
195
. tcx
196
196
. associated_items ( did)
@@ -274,7 +274,7 @@ fn build_type_alias(cx: &mut DocContext<'_>, did: DefId) -> clean::Typedef {
274
274
}
275
275
276
276
/// Builds all inherent implementations of an ADT (struct/union/enum) or Trait item/path/reexport.
277
- crate fn build_impls (
277
+ pub ( crate ) fn build_impls (
278
278
cx : & mut DocContext < ' _ > ,
279
279
parent_module : Option < DefId > ,
280
280
did : DefId ,
@@ -318,7 +318,7 @@ fn merge_attrs(
318
318
}
319
319
320
320
/// Inline an `impl`, inherent or of a trait. The `did` must be for an `impl`.
321
- crate fn build_impl (
321
+ pub ( crate ) fn build_impl (
322
322
cx : & mut DocContext < ' _ > ,
323
323
parent_module : Option < DefId > ,
324
324
did : DefId ,
@@ -565,7 +565,7 @@ fn build_module(
565
565
clean:: Module { items, span }
566
566
}
567
567
568
- crate fn print_inlined_const ( tcx : TyCtxt < ' _ > , did : DefId ) -> String {
568
+ pub ( crate ) fn print_inlined_const ( tcx : TyCtxt < ' _ > , did : DefId ) -> String {
569
569
if let Some ( did) = did. as_local ( ) {
570
570
let hir_id = tcx. hir ( ) . local_def_id_to_hir_id ( did) ;
571
571
rustc_hir_pretty:: id_to_string ( & tcx. hir ( ) , hir_id)
@@ -670,7 +670,7 @@ fn separate_supertrait_bounds(
670
670
( g, ty_bounds)
671
671
}
672
672
673
- crate fn record_extern_trait ( cx : & mut DocContext < ' _ > , did : DefId ) {
673
+ pub ( crate ) fn record_extern_trait ( cx : & mut DocContext < ' _ > , did : DefId ) {
674
674
if did. is_local ( ) {
675
675
return ;
676
676
}
0 commit comments