@@ -289,15 +289,15 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
289
289
w,
290
290
"<div class=\" item-left\" ><code>{}extern crate {} as {};" ,
291
291
myitem. visibility. print_with_space( myitem. def_id, cx) ,
292
- anchor( myitem. def_id. expect_real ( ) , & * src. as_str( ) , cx) ,
292
+ anchor( myitem. def_id. expect_def_id ( ) , & * src. as_str( ) , cx) ,
293
293
myitem. name. as_ref( ) . unwrap( ) ,
294
294
) ,
295
295
None => write ! (
296
296
w,
297
297
"<div class=\" item-left\" ><code>{}extern crate {};" ,
298
298
myitem. visibility. print_with_space( myitem. def_id, cx) ,
299
299
anchor(
300
- myitem. def_id. expect_real ( ) ,
300
+ myitem. def_id. expect_def_id ( ) ,
301
301
& * myitem. name. as_ref( ) . unwrap( ) . as_str( ) ,
302
302
cx
303
303
) ,
@@ -669,9 +669,9 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
669
669
}
670
670
671
671
// If there are methods directly on this trait object, render them here.
672
- render_assoc_items ( w, cx, it, it. def_id . expect_real ( ) , AssocItemRender :: All ) ;
672
+ render_assoc_items ( w, cx, it, it. def_id . expect_def_id ( ) , AssocItemRender :: All ) ;
673
673
674
- if let Some ( implementors) = cx. cache . implementors . get ( & it. def_id . expect_real ( ) ) {
674
+ if let Some ( implementors) = cx. cache . implementors . get ( & it. def_id . expect_def_id ( ) ) {
675
675
// The DefId is for the first Type found with that name. The bool is
676
676
// if any Types with the same name but different DefId have been found.
677
677
let mut implementor_dups: FxHashMap < Symbol , ( DefId , bool ) > = FxHashMap :: default ( ) ;
@@ -787,7 +787,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
787
787
path = if it. def_id. is_local( ) {
788
788
cx. current. join( "/" )
789
789
} else {
790
- let ( ref path, _) = cx. cache. external_paths[ & it. def_id. expect_real ( ) ] ;
790
+ let ( ref path, _) = cx. cache. external_paths[ & it. def_id. expect_def_id ( ) ] ;
791
791
path[ ..path. len( ) - 1 ] . join( "/" )
792
792
} ,
793
793
ty = it. type_( ) ,
@@ -813,7 +813,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clea
813
813
// won't be visible anywhere in the docs. It would be nice to also show
814
814
// associated items from the aliased type (see discussion in #32077), but
815
815
// we need #14072 to make sense of the generics.
816
- render_assoc_items ( w, cx, it, it. def_id . expect_real ( ) , AssocItemRender :: All )
816
+ render_assoc_items ( w, cx, it, it. def_id . expect_def_id ( ) , AssocItemRender :: All )
817
817
}
818
818
819
819
fn item_opaque_ty ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item , t : & clean:: OpaqueTy ) {
@@ -834,7 +834,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean:
834
834
// won't be visible anywhere in the docs. It would be nice to also show
835
835
// associated items from the aliased type (see discussion in #32077), but
836
836
// we need #14072 to make sense of the generics.
837
- render_assoc_items ( w, cx, it, it. def_id . expect_real ( ) , AssocItemRender :: All )
837
+ render_assoc_items ( w, cx, it, it. def_id . expect_def_id ( ) , AssocItemRender :: All )
838
838
}
839
839
840
840
fn item_typedef ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item , t : & clean:: Typedef ) {
@@ -851,7 +851,7 @@ fn item_typedef(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::T
851
851
852
852
document ( w, cx, it, None ) ;
853
853
854
- let def_id = it. def_id . expect_real ( ) ;
854
+ let def_id = it. def_id . expect_def_id ( ) ;
855
855
// Render any items associated directly to this alias, as otherwise they
856
856
// won't be visible anywhere in the docs. It would be nice to also show
857
857
// associated items from the aliased type (see discussion in #32077), but
@@ -903,7 +903,7 @@ fn item_union(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::Uni
903
903
document ( w, cx, field, Some ( it) ) ;
904
904
}
905
905
}
906
- let def_id = it. def_id . expect_real ( ) ;
906
+ let def_id = it. def_id . expect_def_id ( ) ;
907
907
render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
908
908
document_type_layout ( w, cx, def_id) ;
909
909
}
@@ -1041,7 +1041,7 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
1041
1041
}
1042
1042
}
1043
1043
}
1044
- let def_id = it. def_id . expect_real ( ) ;
1044
+ let def_id = it. def_id . expect_def_id ( ) ;
1045
1045
render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
1046
1046
document_type_layout ( w, cx, def_id) ;
1047
1047
}
@@ -1093,7 +1093,7 @@ fn item_proc_macro(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, m: &clean
1093
1093
1094
1094
fn item_primitive ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item ) {
1095
1095
document ( w, cx, it, None ) ;
1096
- render_assoc_items ( w, cx, it, it. def_id . expect_real ( ) , AssocItemRender :: All )
1096
+ render_assoc_items ( w, cx, it, it. def_id . expect_def_id ( ) , AssocItemRender :: All )
1097
1097
}
1098
1098
1099
1099
fn item_constant ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item , c : & clean:: Constant ) {
@@ -1182,7 +1182,7 @@ fn item_struct(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::St
1182
1182
}
1183
1183
}
1184
1184
}
1185
- let def_id = it. def_id . expect_real ( ) ;
1185
+ let def_id = it. def_id . expect_def_id ( ) ;
1186
1186
render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
1187
1187
document_type_layout ( w, cx, def_id) ;
1188
1188
}
@@ -1213,7 +1213,7 @@ fn item_foreign_type(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item) {
1213
1213
1214
1214
document ( w, cx, it, None ) ;
1215
1215
1216
- render_assoc_items ( w, cx, it, it. def_id . expect_real ( ) , AssocItemRender :: All )
1216
+ render_assoc_items ( w, cx, it, it. def_id . expect_def_id ( ) , AssocItemRender :: All )
1217
1217
}
1218
1218
1219
1219
fn item_keyword ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item ) {
0 commit comments