@@ -660,7 +660,7 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
660
660
/// `leftover_operands` is used for `IndexComposite` patterns, if any exist.
661
661
/// If the pattern isn't constraining enough to determine an unique type,
662
662
/// `Err(Ambiguous)` is returned instead.
663
- fn arg_ty_pat (
663
+ fn subst_ty_pat (
664
664
cx : & CodegenCx < ' _ > ,
665
665
pat : & TyPat < ' _ > ,
666
666
ty_vars : & [ Option < Word > ] ,
@@ -673,23 +673,23 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
673
673
} ,
674
674
675
675
TyPat :: Pointer ( _, pat) => SpirvType :: Pointer {
676
- pointee : arg_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
676
+ pointee : subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
677
677
}
678
678
. def ( DUMMY_SP , cx) ,
679
679
680
680
TyPat :: Vector4 ( pat) => SpirvType :: Vector {
681
- element : arg_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
681
+ element : subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
682
682
count : 4 ,
683
683
}
684
684
. def ( DUMMY_SP , cx) ,
685
685
686
686
TyPat :: SampledImage ( pat) => SpirvType :: SampledImage {
687
- image_type : arg_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
687
+ image_type : subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?,
688
688
}
689
689
. def ( DUMMY_SP , cx) ,
690
690
691
691
TyPat :: IndexComposite ( pat) => {
692
- let mut ty =arg_ty_pat ( cx, pat, ty_vars, leftover_operands) ?;
692
+ let mut ty = subst_ty_pat ( cx, pat, ty_vars, leftover_operands) ?;
693
693
for index in leftover_operands {
694
694
let index_to_usize = || match * index {
695
695
// FIXME(eddyb) support more than just literals,
@@ -780,7 +780,7 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
780
780
_ => return None ,
781
781
}
782
782
783
- match arg_ty_pat (
783
+ match subst_ty_pat (
784
784
self ,
785
785
sig. output_type . unwrap ( ) ,
786
786
& combined_ty_vars,
0 commit comments