@@ -611,6 +611,7 @@ impl SerializedSearchIndex {
611611 parent,
612612 trait_parent,
613613 deprecated,
614+ unstable,
614615 associated_item_disambiguator,
615616 } | EntryData {
616617 krate : * map. get ( krate) . unwrap ( ) ,
@@ -621,6 +622,7 @@ impl SerializedSearchIndex {
621622 parent : parent. and_then ( |path_id| map. get ( & path_id) . copied ( ) ) ,
622623 trait_parent : trait_parent. and_then ( |path_id| map. get ( & path_id) . copied ( ) ) ,
623624 deprecated : * deprecated,
625+ unstable : * unstable,
624626 associated_item_disambiguator : associated_item_disambiguator. clone ( ) ,
625627 } ,
626628 ) ,
@@ -889,6 +891,7 @@ struct EntryData {
889891 parent : Option < usize > ,
890892 trait_parent : Option < usize > ,
891893 deprecated : bool ,
894+ unstable : bool ,
892895 associated_item_disambiguator : Option < String > ,
893896}
894897
@@ -905,6 +908,7 @@ impl Serialize for EntryData {
905908 seq. serialize_element ( & self . parent . map ( |id| id + 1 ) . unwrap_or ( 0 ) ) ?;
906909 seq. serialize_element ( & self . trait_parent . map ( |id| id + 1 ) . unwrap_or ( 0 ) ) ?;
907910 seq. serialize_element ( & if self . deprecated { 1 } else { 0 } ) ?;
911+ seq. serialize_element ( & if self . unstable { 1 } else { 0 } ) ?;
908912 if let Some ( disambig) = & self . associated_item_disambiguator {
909913 seq. serialize_element ( & disambig) ?;
910914 }
@@ -939,6 +943,7 @@ impl<'de> Deserialize<'de> for EntryData {
939943 v. next_element ( ) ?. ok_or_else ( || A :: Error :: missing_field ( "trait_parent" ) ) ?;
940944
941945 let deprecated: u32 = v. next_element ( ) ?. unwrap_or ( 0 ) ;
946+ let unstable: u32 = v. next_element ( ) ?. unwrap_or ( 0 ) ;
942947 let associated_item_disambiguator: Option < String > = v. next_element ( ) ?;
943948 Ok ( EntryData {
944949 krate,
@@ -949,6 +954,7 @@ impl<'de> Deserialize<'de> for EntryData {
949954 parent : Option :: < i32 > :: from ( parent) . map ( |path| path as usize ) ,
950955 trait_parent : Option :: < i32 > :: from ( trait_parent) . map ( |path| path as usize ) ,
951956 deprecated : deprecated != 0 ,
957+ unstable : unstable != 0 ,
952958 associated_item_disambiguator,
953959 } )
954960 }
@@ -1275,6 +1281,7 @@ pub(crate) fn build_index(
12751281 ) ,
12761282 aliases : item. attrs . get_doc_aliases ( ) ,
12771283 deprecation : item. deprecation ( tcx) ,
1284+ stability : item. stability ( tcx) ,
12781285 } ) ;
12791286 }
12801287 }
@@ -1370,6 +1377,7 @@ pub(crate) fn build_index(
13701377 parent : None ,
13711378 trait_parent : None ,
13721379 deprecated : false ,
1380+ unstable : false ,
13731381 associated_item_disambiguator : None ,
13741382 } ) ,
13751383 crate_doc,
@@ -1508,6 +1516,7 @@ pub(crate) fn build_index(
15081516 module_path,
15091517 exact_module_path,
15101518 deprecated : item. deprecation . is_some ( ) ,
1519+ unstable : item. stability . is_some_and ( |x| x. is_unstable ( ) ) ,
15111520 associated_item_disambiguator : if let Some ( impl_id) = item. impl_id
15121521 && let Some ( parent_idx) = item. parent_idx
15131522 && associated_item_duplicates
0 commit comments