@@ -503,7 +503,7 @@ pub unsafe trait ComponentType {
503
503
/// Performs a type-check to see whether this component value type matches
504
504
/// the interface type `ty` provided.
505
505
#[ doc( hidden) ]
506
- fn typecheck ( ty : & InterfaceType , types : & InstanceType < ' _ > ) -> Result < ( ) > ;
506
+ fn typecheck ( ty : & InterfaceType , types : & InstanceType ) -> Result < ( ) > ;
507
507
}
508
508
509
509
#[ doc( hidden) ]
@@ -687,7 +687,7 @@ macro_rules! forward_type_impls {
687
687
const ABI : CanonicalAbiInfo = <$b as ComponentType >:: ABI ;
688
688
689
689
#[ inline]
690
- fn typecheck( ty: & InterfaceType , types: & InstanceType < ' _> ) -> Result <( ) > {
690
+ fn typecheck( ty: & InterfaceType , types: & InstanceType ) -> Result <( ) > {
691
691
<$b as ComponentType >:: typecheck( ty, types)
692
692
}
693
693
}
@@ -791,7 +791,7 @@ macro_rules! integers {
791
791
792
792
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: $abi;
793
793
794
- fn typecheck( ty: & InterfaceType , _types: & InstanceType < ' _> ) -> Result <( ) > {
794
+ fn typecheck( ty: & InterfaceType , _types: & InstanceType ) -> Result <( ) > {
795
795
match ty {
796
796
InterfaceType :: $ty => Ok ( ( ) ) ,
797
797
other => bail!( "expected `{}` found `{}`" , desc( & InterfaceType :: $ty) , desc( other) )
@@ -909,7 +909,7 @@ macro_rules! floats {
909
909
910
910
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: $abi;
911
911
912
- fn typecheck( ty: & InterfaceType , _types: & InstanceType < ' _> ) -> Result <( ) > {
912
+ fn typecheck( ty: & InterfaceType , _types: & InstanceType ) -> Result <( ) > {
913
913
match ty {
914
914
InterfaceType :: $ty => Ok ( ( ) ) ,
915
915
other => bail!( "expected `{}` found `{}`" , desc( & InterfaceType :: $ty) , desc( other) )
@@ -1026,7 +1026,7 @@ unsafe impl ComponentType for bool {
1026
1026
1027
1027
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: SCALAR1 ;
1028
1028
1029
- fn typecheck ( ty : & InterfaceType , _types : & InstanceType < ' _ > ) -> Result < ( ) > {
1029
+ fn typecheck ( ty : & InterfaceType , _types : & InstanceType ) -> Result < ( ) > {
1030
1030
match ty {
1031
1031
InterfaceType :: Bool => Ok ( ( ) ) ,
1032
1032
other => bail ! ( "expected `bool` found `{}`" , desc( other) ) ,
@@ -1084,7 +1084,7 @@ unsafe impl ComponentType for char {
1084
1084
1085
1085
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: SCALAR4 ;
1086
1086
1087
- fn typecheck ( ty : & InterfaceType , _types : & InstanceType < ' _ > ) -> Result < ( ) > {
1087
+ fn typecheck ( ty : & InterfaceType , _types : & InstanceType ) -> Result < ( ) > {
1088
1088
match ty {
1089
1089
InterfaceType :: Char => Ok ( ( ) ) ,
1090
1090
other => bail ! ( "expected `char` found `{}`" , desc( other) ) ,
@@ -1146,7 +1146,7 @@ unsafe impl ComponentType for str {
1146
1146
1147
1147
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: POINTER_PAIR ;
1148
1148
1149
- fn typecheck ( ty : & InterfaceType , _types : & InstanceType < ' _ > ) -> Result < ( ) > {
1149
+ fn typecheck ( ty : & InterfaceType , _types : & InstanceType ) -> Result < ( ) > {
1150
1150
match ty {
1151
1151
InterfaceType :: String => Ok ( ( ) ) ,
1152
1152
other => bail ! ( "expected `string` found `{}`" , desc( other) ) ,
@@ -1437,7 +1437,7 @@ unsafe impl ComponentType for WasmStr {
1437
1437
1438
1438
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: POINTER_PAIR ;
1439
1439
1440
- fn typecheck ( ty : & InterfaceType , _types : & InstanceType < ' _ > ) -> Result < ( ) > {
1440
+ fn typecheck ( ty : & InterfaceType , _types : & InstanceType ) -> Result < ( ) > {
1441
1441
match ty {
1442
1442
InterfaceType :: String => Ok ( ( ) ) ,
1443
1443
other => bail ! ( "expected `string` found `{}`" , desc( other) ) ,
@@ -1476,7 +1476,7 @@ where
1476
1476
1477
1477
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: POINTER_PAIR ;
1478
1478
1479
- fn typecheck ( ty : & InterfaceType , types : & InstanceType < ' _ > ) -> Result < ( ) > {
1479
+ fn typecheck ( ty : & InterfaceType , types : & InstanceType ) -> Result < ( ) > {
1480
1480
match ty {
1481
1481
InterfaceType :: List ( t) => T :: typecheck ( & types. types [ * t] . element , types) ,
1482
1482
other => bail ! ( "expected `list` found `{}`" , desc( other) ) ,
@@ -1742,7 +1742,7 @@ unsafe impl<T: ComponentType> ComponentType for WasmList<T> {
1742
1742
1743
1743
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: POINTER_PAIR ;
1744
1744
1745
- fn typecheck ( ty : & InterfaceType , types : & InstanceType < ' _ > ) -> Result < ( ) > {
1745
+ fn typecheck ( ty : & InterfaceType , types : & InstanceType ) -> Result < ( ) > {
1746
1746
<[ T ] as ComponentType >:: typecheck ( ty, types)
1747
1747
}
1748
1748
}
@@ -1777,8 +1777,8 @@ unsafe impl<T: Lift> Lift for WasmList<T> {
1777
1777
/// Verify that the given wasm type is a tuple with the expected fields in the right order.
1778
1778
fn typecheck_tuple (
1779
1779
ty : & InterfaceType ,
1780
- types : & InstanceType < ' _ > ,
1781
- expected : & [ fn ( & InterfaceType , & InstanceType < ' _ > ) -> Result < ( ) > ] ,
1780
+ types : & InstanceType ,
1781
+ expected : & [ fn ( & InterfaceType , & InstanceType ) -> Result < ( ) > ] ,
1782
1782
) -> Result < ( ) > {
1783
1783
match ty {
1784
1784
InterfaceType :: Tuple ( t) => {
@@ -1803,8 +1803,8 @@ fn typecheck_tuple(
1803
1803
/// names.
1804
1804
pub fn typecheck_record (
1805
1805
ty : & InterfaceType ,
1806
- types : & InstanceType < ' _ > ,
1807
- expected : & [ ( & str , fn ( & InterfaceType , & InstanceType < ' _ > ) -> Result < ( ) > ) ] ,
1806
+ types : & InstanceType ,
1807
+ expected : & [ ( & str , fn ( & InterfaceType , & InstanceType ) -> Result < ( ) > ) ] ,
1808
1808
) -> Result < ( ) > {
1809
1809
match ty {
1810
1810
InterfaceType :: Record ( index) => {
@@ -1837,10 +1837,10 @@ pub fn typecheck_record(
1837
1837
/// names.
1838
1838
pub fn typecheck_variant (
1839
1839
ty : & InterfaceType ,
1840
- types : & InstanceType < ' _ > ,
1840
+ types : & InstanceType ,
1841
1841
expected : & [ (
1842
1842
& str ,
1843
- Option < fn ( & InterfaceType , & InstanceType < ' _ > ) -> Result < ( ) > > ,
1843
+ Option < fn ( & InterfaceType , & InstanceType ) -> Result < ( ) > > ,
1844
1844
) ] ,
1845
1845
) -> Result < ( ) > {
1846
1846
match ty {
@@ -1881,11 +1881,7 @@ pub fn typecheck_variant(
1881
1881
1882
1882
/// Verify that the given wasm type is a enum with the expected cases in the right order and with the right
1883
1883
/// names.
1884
- pub fn typecheck_enum (
1885
- ty : & InterfaceType ,
1886
- types : & InstanceType < ' _ > ,
1887
- expected : & [ & str ] ,
1888
- ) -> Result < ( ) > {
1884
+ pub fn typecheck_enum ( ty : & InterfaceType , types : & InstanceType , expected : & [ & str ] ) -> Result < ( ) > {
1889
1885
match ty {
1890
1886
InterfaceType :: Enum ( index) => {
1891
1887
let names = & types. types [ * index] . names ;
@@ -1912,11 +1908,7 @@ pub fn typecheck_enum(
1912
1908
1913
1909
/// Verify that the given wasm type is a flags type with the expected flags in the right order and with the right
1914
1910
/// names.
1915
- pub fn typecheck_flags (
1916
- ty : & InterfaceType ,
1917
- types : & InstanceType < ' _ > ,
1918
- expected : & [ & str ] ,
1919
- ) -> Result < ( ) > {
1911
+ pub fn typecheck_flags ( ty : & InterfaceType , types : & InstanceType , expected : & [ & str ] ) -> Result < ( ) > {
1920
1912
match ty {
1921
1913
InterfaceType :: Flags ( index) => {
1922
1914
let names = & types. types [ * index] . names ;
@@ -1967,7 +1959,7 @@ where
1967
1959
1968
1960
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: variant_static ( & [ None , Some ( T :: ABI ) ] ) ;
1969
1961
1970
- fn typecheck ( ty : & InterfaceType , types : & InstanceType < ' _ > ) -> Result < ( ) > {
1962
+ fn typecheck ( ty : & InterfaceType , types : & InstanceType ) -> Result < ( ) > {
1971
1963
match ty {
1972
1964
InterfaceType :: Option ( t) => T :: typecheck ( & types. types [ * t] . ty , types) ,
1973
1965
other => bail ! ( "expected `option` found `{}`" , desc( other) ) ,
@@ -2096,7 +2088,7 @@ where
2096
2088
2097
2089
const ABI : CanonicalAbiInfo = CanonicalAbiInfo :: variant_static ( & [ Some ( T :: ABI ) , Some ( E :: ABI ) ] ) ;
2098
2090
2099
- fn typecheck ( ty : & InterfaceType , types : & InstanceType < ' _ > ) -> Result < ( ) > {
2091
+ fn typecheck ( ty : & InterfaceType , types : & InstanceType ) -> Result < ( ) > {
2100
2092
match ty {
2101
2093
InterfaceType :: Result ( r) => {
2102
2094
let result = & types. types [ * r] ;
@@ -2456,7 +2448,7 @@ macro_rules! impl_component_ty_for_tuples {
2456
2448
2457
2449
fn typecheck(
2458
2450
ty: & InterfaceType ,
2459
- types: & InstanceType < ' _> ,
2451
+ types: & InstanceType ,
2460
2452
) -> Result <( ) > {
2461
2453
typecheck_tuple( ty, types, & [ $( $t:: typecheck) ,* ] )
2462
2454
}
0 commit comments