@@ -289,15 +289,15 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
289289 w,
290290 "<div class=\" item-left\" ><code>{}extern crate {} as {};" ,
291291 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) ,
293293 myitem. name. as_ref( ) . unwrap( ) ,
294294 ) ,
295295 None => write ! (
296296 w,
297297 "<div class=\" item-left\" ><code>{}extern crate {};" ,
298298 myitem. visibility. print_with_space( myitem. def_id, cx) ,
299299 anchor(
300- myitem. def_id. expect_real ( ) ,
300+ myitem. def_id. expect_def_id ( ) ,
301301 & * myitem. name. as_ref( ) . unwrap( ) . as_str( ) ,
302302 cx
303303 ) ,
@@ -669,9 +669,9 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
669669 }
670670
671671 // 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 ) ;
673673
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 ( ) ) {
675675 // The DefId is for the first Type found with that name. The bool is
676676 // if any Types with the same name but different DefId have been found.
677677 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
787787 path = if it. def_id. is_local( ) {
788788 cx. current. join( "/" )
789789 } 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 ( ) ] ;
791791 path[ ..path. len( ) - 1 ] . join( "/" )
792792 } ,
793793 ty = it. type_( ) ,
@@ -813,7 +813,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clea
813813 // won't be visible anywhere in the docs. It would be nice to also show
814814 // associated items from the aliased type (see discussion in #32077), but
815815 // 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 )
817817}
818818
819819fn 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:
834834 // won't be visible anywhere in the docs. It would be nice to also show
835835 // associated items from the aliased type (see discussion in #32077), but
836836 // 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 )
838838}
839839
840840fn 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
851851
852852 document ( w, cx, it, None ) ;
853853
854- let def_id = it. def_id . expect_real ( ) ;
854+ let def_id = it. def_id . expect_def_id ( ) ;
855855 // Render any items associated directly to this alias, as otherwise they
856856 // won't be visible anywhere in the docs. It would be nice to also show
857857 // 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
903903 document ( w, cx, field, Some ( it) ) ;
904904 }
905905 }
906- let def_id = it. def_id . expect_real ( ) ;
906+ let def_id = it. def_id . expect_def_id ( ) ;
907907 render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
908908 document_type_layout ( w, cx, def_id) ;
909909}
@@ -1041,7 +1041,7 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
10411041 }
10421042 }
10431043 }
1044- let def_id = it. def_id . expect_real ( ) ;
1044+ let def_id = it. def_id . expect_def_id ( ) ;
10451045 render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
10461046 document_type_layout ( w, cx, def_id) ;
10471047}
@@ -1093,7 +1093,7 @@ fn item_proc_macro(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, m: &clean
10931093
10941094fn item_primitive ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item ) {
10951095 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 )
10971097}
10981098
10991099fn 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
11821182 }
11831183 }
11841184 }
1185- let def_id = it. def_id . expect_real ( ) ;
1185+ let def_id = it. def_id . expect_def_id ( ) ;
11861186 render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
11871187 document_type_layout ( w, cx, def_id) ;
11881188}
@@ -1213,7 +1213,7 @@ fn item_foreign_type(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item) {
12131213
12141214 document ( w, cx, it, None ) ;
12151215
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 )
12171217}
12181218
12191219fn item_keyword ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item ) {
0 commit comments