@@ -2024,13 +2024,17 @@ macro_rules! sty_debug_print {
2024
2024
total: usize ,
2025
2025
region_infer: usize ,
2026
2026
ty_infer: usize ,
2027
- both_infer: usize ,
2027
+ ct_infer: usize ,
2028
+ all_infer: usize ,
2028
2029
}
2029
2030
2030
2031
pub fn go( tcx: TyCtxt ) {
2031
2032
let mut total = DebugStat {
2032
2033
total: 0 ,
2033
- region_infer: 0 , ty_infer: 0 , both_infer: 0 ,
2034
+ region_infer: 0 ,
2035
+ ty_infer: 0 ,
2036
+ ct_infer: 0 ,
2037
+ all_infer: 0 ,
2034
2038
} ;
2035
2039
$( let mut $variant = total; ) *
2036
2040
@@ -2044,30 +2048,33 @@ macro_rules! sty_debug_print {
2044
2048
} ;
2045
2049
let region = t. flags. intersects( ty:: TypeFlags :: HAS_RE_INFER ) ;
2046
2050
let ty = t. flags. intersects( ty:: TypeFlags :: HAS_TY_INFER ) ;
2047
- // TODO(const_generics)
2051
+ let ct = t . flags . intersects ( ty :: TypeFlags :: HAS_CT_INFER ) ;
2048
2052
2049
2053
variant. total += 1 ;
2050
2054
total. total += 1 ;
2051
2055
if region { total. region_infer += 1 ; variant. region_infer += 1 }
2052
2056
if ty { total. ty_infer += 1 ; variant. ty_infer += 1 }
2053
- if region && ty { total. both_infer += 1 ; variant. both_infer += 1 }
2057
+ if ct { total. ct_infer += 1 ; variant. ct_infer += 1 }
2058
+ if region && ty && ct { total. all_infer += 1 ; variant. all_infer += 1 }
2054
2059
}
2055
- println!( "Ty interner total ty region both " ) ;
2060
+ println!( "Ty interner total ty region ct all " ) ;
2056
2061
$( println!( " {:18}: {uses:6} {usespc:4.1}%, \
2057
- {ty:4.1}% {region:5.1}% {both :4.1}%",
2062
+ {ty:4.1}% {region:5.1}% {ct:4.1}% {all :4.1}%",
2058
2063
stringify!( $variant) ,
2059
2064
uses = $variant. total,
2060
2065
usespc = $variant. total as f64 * 100.0 / total. total as f64 ,
2061
- ty = $variant. ty_infer as f64 * 100.0 / total. total as f64 ,
2062
- region = $variant. region_infer as f64 * 100.0 / total. total as f64 ,
2063
- both = $variant. both_infer as f64 * 100.0 / total. total as f64 ) ;
2066
+ ty = $variant. ty_infer as f64 * 100.0 / total. total as f64 ,
2067
+ ct = $variant. ct_infer as f64 * 100.0 / total. total as f64 ,
2068
+ region = $variant. region_infer as f64 * 100.0 / total. total as f64 ,
2069
+ all = $variant. all_infer as f64 * 100.0 / total. total as f64 ) ;
2064
2070
) *
2065
2071
println!( " total {uses:6} \
2066
- {ty:4.1}% {region:5.1}% {both :4.1}%",
2072
+ {ty:4.1}% {region:5.1}% {ct:4.1}% {all :4.1}%",
2067
2073
uses = total. total,
2068
- ty = total. ty_infer as f64 * 100.0 / total. total as f64 ,
2069
- region = total. region_infer as f64 * 100.0 / total. total as f64 ,
2070
- both = total. both_infer as f64 * 100.0 / total. total as f64 )
2074
+ ty = total. ty_infer as f64 * 100.0 / total. total as f64 ,
2075
+ ct = total. ct_infer as f64 * 100.0 / total. total as f64 ,
2076
+ region = total. region_infer as f64 * 100.0 / total. total as f64 ,
2077
+ all = total. all_infer as f64 * 100.0 / total. total as f64 )
2071
2078
}
2072
2079
}
2073
2080
0 commit comments