@@ -19,8 +19,8 @@ use super::{
19
19
collect_paths_for_type, document, ensure_trailing_slash, get_filtered_impls_for_reference,
20
20
item_ty_to_section, notable_traits_button, notable_traits_json, render_all_impls,
21
21
render_assoc_item, render_assoc_items, render_attributes_in_code, render_attributes_in_pre,
22
- render_impl, render_rightside, render_stability_since_raw, AssocItemLink , Context ,
23
- ImplRenderingParameters ,
22
+ render_impl, render_rightside, render_stability_since_raw,
23
+ render_stability_since_raw_with_extra , AssocItemLink , Context , ImplRenderingParameters ,
24
24
} ;
25
25
use crate :: clean;
26
26
use crate :: config:: ModuleSorting ;
@@ -1267,30 +1267,30 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
1267
1267
document_non_exhaustive_header( it)
1268
1268
) ;
1269
1269
document_non_exhaustive ( w, it) ;
1270
+ write ! ( w, "<div class=\" variants\" >" ) ;
1270
1271
for variant in e. variants ( ) {
1271
1272
let id = cx. derive_id ( format ! ( "{}.{}" , ItemType :: Variant , variant. name. unwrap( ) ) ) ;
1272
1273
write ! (
1273
1274
w,
1274
- "<h3 id=\" {id}\" class=\" variant small-section-header\" >\
1275
- <a href=\" #{id}\" class=\" anchor field\" ></a>\
1276
- <code>{name}",
1275
+ "<section id=\" {id}\" class=\" variant\" >\
1276
+ <a href=\" #{id}\" class=\" anchor\" ></a>",
1277
1277
id = id,
1278
- name = variant. name. unwrap( )
1279
1278
) ;
1280
- if let clean:: VariantItem ( clean:: Variant :: Tuple ( ref s) ) = * variant. kind {
1281
- w. write_str ( "(" ) ;
1282
- print_tuple_struct_fields ( w, cx, s) ;
1283
- w. write_str ( ")" ) ;
1284
- }
1285
- w. write_str ( "</code>" ) ;
1286
- render_stability_since_raw (
1279
+ render_stability_since_raw_with_extra (
1287
1280
w,
1288
1281
variant. stable_since ( tcx) ,
1289
1282
variant. const_stability ( tcx) ,
1290
1283
it. stable_since ( tcx) ,
1291
1284
it. const_stable_since ( tcx) ,
1285
+ " rightside" ,
1292
1286
) ;
1293
- w. write_str ( "</h3>" ) ;
1287
+ write ! ( w, "<h3 class=\" code-header\" >{name}" , name = variant. name. unwrap( ) ) ;
1288
+ if let clean:: VariantItem ( clean:: Variant :: Tuple ( ref s) ) = * variant. kind {
1289
+ w. write_str ( "(" ) ;
1290
+ print_tuple_struct_fields ( w, cx, s) ;
1291
+ w. write_str ( ")" ) ;
1292
+ }
1293
+ w. write_str ( "</h3></section>" ) ;
1294
1294
1295
1295
use crate :: clean:: Variant ;
1296
1296
@@ -1324,7 +1324,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
1324
1324
write ! (
1325
1325
w,
1326
1326
"<div class=\" sub-variant-field\" >\
1327
- <span id=\" {id}\" class=\" variant small-section-header\" >\
1327
+ <span id=\" {id}\" class=\" small-section-header\" >\
1328
1328
<a href=\" #{id}\" class=\" anchor field\" ></a>\
1329
1329
<code>{f}: {t}</code>\
1330
1330
</span>",
@@ -1343,6 +1343,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
1343
1343
1344
1344
document ( w, cx, variant, Some ( it) , HeadingOffset :: H4 ) ;
1345
1345
}
1346
+ write ! ( w, "</div>" ) ;
1346
1347
}
1347
1348
let def_id = it. item_id . expect_def_id ( ) ;
1348
1349
render_assoc_items ( w, cx, it, def_id, AssocItemRender :: All ) ;
0 commit comments