@@ -709,8 +709,11 @@ pub(crate) fn build_index(
709
709
let mut result = Vec :: new ( ) ;
710
710
for ( index, item) in self . items . iter ( ) . enumerate ( ) {
711
711
if let Some ( ty) = & item. search_type
712
- && let my =
713
- ty. param_names . iter ( ) . map ( |sym| sym. as_str ( ) ) . collect :: < Vec < _ > > ( )
712
+ && let my = ty
713
+ . param_names
714
+ . iter ( )
715
+ . filter_map ( |sym| sym. map ( |sym| sym. to_string ( ) ) )
716
+ . collect :: < Vec < _ > > ( )
714
717
&& my != prev
715
718
{
716
719
result. push ( ( index, my. join ( "," ) ) ) ;
@@ -1372,7 +1375,7 @@ fn simplify_fn_constraint<'a>(
1372
1375
/// Used to allow type-based search on constants and statics.
1373
1376
fn make_nullary_fn (
1374
1377
clean_type : & clean:: Type ,
1375
- ) -> ( Vec < RenderType > , Vec < RenderType > , Vec < Symbol > , Vec < Vec < RenderType > > ) {
1378
+ ) -> ( Vec < RenderType > , Vec < RenderType > , Vec < Option < Symbol > > , Vec < Vec < RenderType > > ) {
1376
1379
let mut rgen: FxIndexMap < SimplifiedParam , ( isize , Vec < RenderType > ) > = Default :: default ( ) ;
1377
1380
let output = get_index_type ( clean_type, vec ! [ ] , & mut rgen) ;
1378
1381
( vec ! [ ] , vec ! [ output] , vec ! [ ] , vec ! [ ] )
@@ -1387,7 +1390,7 @@ fn get_fn_inputs_and_outputs(
1387
1390
tcx : TyCtxt < ' _ > ,
1388
1391
impl_or_trait_generics : Option < & ( clean:: Type , clean:: Generics ) > ,
1389
1392
cache : & Cache ,
1390
- ) -> ( Vec < RenderType > , Vec < RenderType > , Vec < Symbol > , Vec < Vec < RenderType > > ) {
1393
+ ) -> ( Vec < RenderType > , Vec < RenderType > , Vec < Option < Symbol > > , Vec < Vec < RenderType > > ) {
1391
1394
let decl = & func. decl ;
1392
1395
1393
1396
let mut rgen: FxIndexMap < SimplifiedParam , ( isize , Vec < RenderType > ) > = Default :: default ( ) ;
@@ -1441,10 +1444,10 @@ fn get_fn_inputs_and_outputs(
1441
1444
simplified_params
1442
1445
. iter ( )
1443
1446
. map ( |( name, ( _idx, _traits) ) | match name {
1444
- SimplifiedParam :: Symbol ( name) => * name,
1445
- SimplifiedParam :: Anonymous ( _) => kw :: Empty ,
1447
+ SimplifiedParam :: Symbol ( name) => Some ( * name) ,
1448
+ SimplifiedParam :: Anonymous ( _) => None ,
1446
1449
SimplifiedParam :: AssociatedType ( def_id, name) => {
1447
- Symbol :: intern ( & format ! ( "{}::{}" , tcx. item_name( * def_id) , name) )
1450
+ Some ( Symbol :: intern ( & format ! ( "{}::{}" , tcx. item_name( * def_id) , name) ) )
1448
1451
}
1449
1452
} )
1450
1453
. collect ( ) ,
0 commit comments