@@ -4944,6 +4944,34 @@ pub fn construct_parameter_environment(
4944
4944
{
4945
4945
/*! See `ParameterEnvironment` struct def'n for details */
4946
4946
4947
+ {
4948
+ fn types_idents_and_bounds ( tcx : & ctxt , params : & [ TypeParameterDef ] ) -> ~str {
4949
+ params. iter ( ) . fold ( ( ~"[ ", false), |(accum_str, plural), tpd| {
4950
+ let accum_str = if plural { accum_str.append(" , ") } else { accum_str };
4951
+ let entry = format!(" { : s} : { : s} ", tpd.ident.repr(tcx), tpd.bounds.repr(tcx));
4952
+ (accum_str.append(entry), true)
4953
+ }).val0().append(" ] ")
4954
+ }
4955
+
4956
+ fn regions_idents_and_bounds ( tcx : & ctxt , params : & [ RegionParameterDef ] ) -> ~str {
4957
+ params. iter ( ) . fold ( ( ~"[ ", false), |(accum_str, plural), rpd| {
4958
+ let accum_str = if plural { accum_str.append(" , ") } else { accum_str };
4959
+ let entry = rpd.repr(tcx);
4960
+ (accum_str.append(entry), true)
4961
+ }).val0().append(" ] ")
4962
+ }
4963
+
4964
+ debug ! ( "construct_parameter_environment(\
4965
+ self_bound={:?}, item_type_params={}, method_type_params={}, \
4966
+ item_region_params={}, method_region_params={}, free_id={})",
4967
+ self_bound,
4968
+ types_idents_and_bounds( tcx, item_type_params) ,
4969
+ types_idents_and_bounds( tcx, method_type_params) ,
4970
+ regions_idents_and_bounds( tcx, item_region_params) ,
4971
+ regions_idents_and_bounds( tcx, method_region_params) ,
4972
+ free_id) ;
4973
+ }
4974
+
4947
4975
//
4948
4976
// Construct the free substs.
4949
4977
//
0 commit comments