@@ -2157,14 +2157,14 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
2157
2157
Some ( ref src) => write ! (
2158
2158
w,
2159
2159
"<tr><td><code>{}extern crate {} as {};" ,
2160
- myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id. expect_local ( ) ) ,
2160
+ myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id) ,
2161
2161
anchor( myitem. def_id, & * src. as_str( ) ) ,
2162
2162
name
2163
2163
) ,
2164
2164
None => write ! (
2165
2165
w,
2166
2166
"<tr><td><code>{}extern crate {};" ,
2167
- myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id. expect_local ( ) ) ,
2167
+ myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id) ,
2168
2168
anchor( myitem. def_id, & * name. as_str( ) )
2169
2169
) ,
2170
2170
}
@@ -2175,7 +2175,7 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
2175
2175
write ! (
2176
2176
w,
2177
2177
"<tr><td><code>{}{}</code></td></tr>" ,
2178
- myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id. expect_local ( ) ) ,
2178
+ myitem. visibility. print_with_space( cx. tcx( ) , myitem. def_id) ,
2179
2179
import. print( )
2180
2180
) ;
2181
2181
}
@@ -2392,7 +2392,7 @@ fn item_constant(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, c: &clean::
2392
2392
write ! (
2393
2393
w,
2394
2394
"{vis}const {name}: {typ}" ,
2395
- vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2395
+ vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2396
2396
name = it. name. as_ref( ) . unwrap( ) ,
2397
2397
typ = c. type_. print( ) ,
2398
2398
) ;
@@ -2426,7 +2426,7 @@ fn item_static(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::St
2426
2426
write ! (
2427
2427
w,
2428
2428
"{vis}static {mutability}{name}: {typ}</pre>" ,
2429
- vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2429
+ vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2430
2430
mutability = s. mutability. print_with_space( ) ,
2431
2431
name = it. name. as_ref( ) . unwrap( ) ,
2432
2432
typ = s. type_. print( )
@@ -2437,7 +2437,7 @@ fn item_static(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, s: &clean::St
2437
2437
fn item_function ( w : & mut Buffer , cx : & Context < ' _ > , it : & clean:: Item , f : & clean:: Function ) {
2438
2438
let header_len = format ! (
2439
2439
"{}{}{}{}{:#}fn {}{:#}" ,
2440
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2440
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2441
2441
f. header. constness. print_with_space( ) ,
2442
2442
f. header. asyncness. print_with_space( ) ,
2443
2443
f. header. unsafety. print_with_space( ) ,
@@ -2452,7 +2452,7 @@ fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::
2452
2452
w,
2453
2453
"{vis}{constness}{asyncness}{unsafety}{abi}fn \
2454
2454
{name}{generics}{decl}{spotlight}{where_clause}</pre>",
2455
- vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2455
+ vis = it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2456
2456
constness = f. header. constness. print_with_space( ) ,
2457
2457
asyncness = f. header. asyncness. print_with_space( ) ,
2458
2458
unsafety = f. header. unsafety. print_with_space( ) ,
@@ -2578,7 +2578,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
2578
2578
write ! (
2579
2579
w,
2580
2580
"{}{}{}trait {}{}{}" ,
2581
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2581
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2582
2582
t. unsafety. print_with_space( ) ,
2583
2583
if t. is_auto { "auto " } else { "" } ,
2584
2584
it. name. as_ref( ) . unwrap( ) ,
@@ -2896,7 +2896,7 @@ fn assoc_const(
2896
2896
w,
2897
2897
"{}{}const <a href=\" {}\" class=\" constant\" ><b>{}</b></a>: {}" ,
2898
2898
extra,
2899
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
2899
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
2900
2900
naive_assoc_href( it, link) ,
2901
2901
it. name. as_ref( ) . unwrap( ) ,
2902
2902
ty. print( )
@@ -3015,7 +3015,7 @@ fn render_assoc_item(
3015
3015
} ;
3016
3016
let mut header_len = format ! (
3017
3017
"{}{}{}{}{}{:#}fn {}{:#}" ,
3018
- meth. visibility. print_with_space( cx. tcx( ) , meth. def_id. expect_local ( ) ) ,
3018
+ meth. visibility. print_with_space( cx. tcx( ) , meth. def_id) ,
3019
3019
header. constness. print_with_space( ) ,
3020
3020
header. asyncness. print_with_space( ) ,
3021
3021
header. unsafety. print_with_space( ) ,
@@ -3037,7 +3037,7 @@ fn render_assoc_item(
3037
3037
"{}{}{}{}{}{}{}fn <a href=\" {href}\" class=\" fnname\" >{name}</a>\
3038
3038
{generics}{decl}{spotlight}{where_clause}",
3039
3039
if parent == ItemType :: Trait { " " } else { "" } ,
3040
- meth. visibility. print_with_space( cx. tcx( ) , meth. def_id. expect_local ( ) ) ,
3040
+ meth. visibility. print_with_space( cx. tcx( ) , meth. def_id) ,
3041
3041
header. constness. print_with_space( ) ,
3042
3042
header. asyncness. print_with_space( ) ,
3043
3043
header. unsafety. print_with_space( ) ,
@@ -3189,7 +3189,7 @@ fn item_enum(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, e: &clean::Enum
3189
3189
write ! (
3190
3190
w,
3191
3191
"{}enum {}{}{}" ,
3192
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
3192
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
3193
3193
it. name. as_ref( ) . unwrap( ) ,
3194
3194
e. generics. print( ) ,
3195
3195
WhereClause { gens: & e. generics, indent: 0 , end_newline: true }
@@ -3364,7 +3364,7 @@ fn render_struct(
3364
3364
write ! (
3365
3365
w,
3366
3366
"{}{}{}" ,
3367
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
3367
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
3368
3368
if structhead { "struct " } else { "" } ,
3369
3369
it. name. as_ref( ) . unwrap( )
3370
3370
) ;
@@ -3384,7 +3384,7 @@ fn render_struct(
3384
3384
w,
3385
3385
"\n {} {}{}: {}," ,
3386
3386
tab,
3387
- field. visibility. print_with_space( cx. tcx( ) , field. def_id. expect_local ( ) ) ,
3387
+ field. visibility. print_with_space( cx. tcx( ) , field. def_id) ,
3388
3388
field. name. as_ref( ) . unwrap( ) ,
3389
3389
ty. print( )
3390
3390
) ;
@@ -3416,9 +3416,7 @@ fn render_struct(
3416
3416
write ! (
3417
3417
w,
3418
3418
"{}{}" ,
3419
- field
3420
- . visibility
3421
- . print_with_space( cx. tcx( ) , field. def_id. expect_local( ) ) ,
3419
+ field. visibility. print_with_space( cx. tcx( ) , field. def_id) ,
3422
3420
ty. print( )
3423
3421
)
3424
3422
}
@@ -3453,7 +3451,7 @@ fn render_union(
3453
3451
write ! (
3454
3452
w,
3455
3453
"{}{}{}" ,
3456
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
3454
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
3457
3455
if structhead { "union " } else { "" } ,
3458
3456
it. name. as_ref( ) . unwrap( )
3459
3457
) ;
@@ -3468,7 +3466,7 @@ fn render_union(
3468
3466
write ! (
3469
3467
w,
3470
3468
" {}{}: {},\n {}" ,
3471
- field. visibility. print_with_space( cx. tcx( ) , field. def_id. expect_local ( ) ) ,
3469
+ field. visibility. print_with_space( cx. tcx( ) , field. def_id) ,
3472
3470
field. name. as_ref( ) . unwrap( ) ,
3473
3471
ty. print( ) ,
3474
3472
tab
@@ -4107,7 +4105,7 @@ fn item_foreign_type(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, cache:
4107
4105
write ! (
4108
4106
w,
4109
4107
" {}type {};\n }}</pre>" ,
4110
- it. visibility. print_with_space( cx. tcx( ) , it. def_id. expect_local ( ) ) ,
4108
+ it. visibility. print_with_space( cx. tcx( ) , it. def_id) ,
4111
4109
it. name. as_ref( ) . unwrap( ) ,
4112
4110
) ;
4113
4111
0 commit comments