File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,15 @@ fn item_visibility(item: rbml::Doc) -> ast::Visibility {
172
172
}
173
173
174
174
fn item_sort ( item : rbml:: Doc ) -> char {
175
- // NB(pcwalton): The default of 'r' here is relied upon in
176
- // `is_associated_type` below.
177
- let mut ret = 'r' ;
175
+ let mut ret = None ;
178
176
reader:: tagged_docs ( item, tag_item_trait_item_sort, |doc| {
179
- ret = doc. as_str_slice ( ) . as_bytes ( ) [ 0 ] as char ;
177
+ ret = Some ( doc. as_str_slice ( ) . as_bytes ( ) [ 0 ] as char ) ;
180
178
false
181
179
} ) ;
182
- ret
180
+ match ret {
181
+ Some ( r) => r,
182
+ None => panic ! ( "No item_sort found" )
183
+ }
183
184
}
184
185
185
186
fn item_symbol ( item : rbml:: Doc ) -> String {
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ fn encode_info_for_associated_type(ecx: &EncodeContext,
898
898
encode_visibility ( rbml_w, associated_type. vis ) ;
899
899
encode_family ( rbml_w, 'y' ) ;
900
900
encode_parent_item ( rbml_w, local_def ( parent_id) ) ;
901
- encode_item_sort ( rbml_w, 'r ' ) ;
901
+ encode_item_sort ( rbml_w, 't ' ) ;
902
902
903
903
let stab = stability:: lookup ( ecx. tcx , associated_type. def_id ) ;
904
904
encode_stability ( rbml_w, stab) ;
@@ -1404,6 +1404,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
1404
1404
encode_path ( rbml_w,
1405
1405
path. clone ( ) . chain ( Some ( elem) . into_iter ( ) ) ) ;
1406
1406
1407
+ encode_item_sort ( rbml_w, 't' ) ;
1407
1408
encode_family ( rbml_w, 'y' ) ;
1408
1409
1409
1410
is_nonstatic_method = false ;
You can’t perform that action at this time.
0 commit comments