1+ use  rustc_abi:: TyAbiInterface ; 
2+ 
13use  crate :: callconv:: { ArgAbi ,  FnAbi } ; 
24use  crate :: spec:: HasTargetSpec ; 
35
@@ -9,7 +11,10 @@ fn classify_ret<Ty>(ret: &mut ArgAbi<'_, Ty>) {
911    } 
1012} 
1113
12- fn  classify_arg < Ty > ( cx :  & impl  HasTargetSpec ,  arg :  & mut  ArgAbi < ' _ ,  Ty > )  { 
14+ fn  classify_arg < ' a ,  Ty ,  C > ( cx :  & impl  HasTargetSpec ,  arg :  & mut  ArgAbi < ' a ,  Ty > ) 
15+ where 
16+     Ty :  TyAbiInterface < ' a ,  C >  + Copy , 
17+ { 
1318    if  arg. is_ignore ( )  { 
1419        // powerpc-unknown-linux-{gnu,musl,uclibc} doesn't ignore ZSTs. 
1520        if  cx. target_spec ( ) . os  == "linux" 
@@ -20,14 +25,19 @@ fn classify_arg<Ty>(cx: &impl HasTargetSpec, arg: &mut ArgAbi<'_, Ty>) {
2025        } 
2126        return ; 
2227    } 
23-     if  arg. layout . is_aggregate ( )  { 
28+     // `is_pass_indirectly` is only `true` for `VaList` which is already an aggregate, so the 
29+     // `.is_pass_indirectly()` call is just to make it explicit that this case is handled. 
30+     if  arg. layout . is_aggregate ( )  || arg. layout . is_pass_indirectly ( )  { 
2431        arg. make_indirect ( ) ; 
2532    }  else  { 
2633        arg. extend_integer_width_to ( 32 ) ; 
2734    } 
2835} 
2936
30- pub ( crate )  fn  compute_abi_info < Ty > ( cx :  & impl  HasTargetSpec ,  fn_abi :  & mut  FnAbi < ' _ ,  Ty > )  { 
37+ pub ( crate )  fn  compute_abi_info < ' a ,  Ty ,  C > ( cx :  & impl  HasTargetSpec ,  fn_abi :  & mut  FnAbi < ' a ,  Ty > ) 
38+ where 
39+     Ty :  TyAbiInterface < ' a ,  C >  + Copy , 
40+ { 
3141    if  !fn_abi. ret . is_ignore ( )  { 
3242        classify_ret ( & mut  fn_abi. ret ) ; 
3343    } 
0 commit comments