@@ -974,9 +974,10 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
974
974
let principal = self . instantiate_poly_trait_ref ( & trait_bounds[ 0 ] ,
975
975
dummy_self,
976
976
& mut projection_bounds) ;
977
+ debug ! ( "principal: {:?}" , principal) ;
977
978
978
979
for trait_bound in trait_bounds[ 1 ..] . iter ( ) {
979
- // Sanity check for non-principal trait bounds
980
+ // sanity check for non-principal trait bounds
980
981
self . instantiate_poly_trait_ref ( trait_bound,
981
982
dummy_self,
982
983
& mut vec ! [ ] ) ;
@@ -1008,9 +1009,9 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
1008
1009
} )
1009
1010
} ) ;
1010
1011
1011
- // check that there are no gross object safety violations,
1012
+ // Check that there are no gross object safety violations;
1012
1013
// most importantly, that the supertraits don't contain Self,
1013
- // to avoid ICE-s .
1014
+ // to avoid ICEs .
1014
1015
let object_safety_violations =
1015
1016
tcx. astconv_object_safety_violations ( principal. def_id ( ) ) ;
1016
1017
if !object_safety_violations. is_empty ( ) {
@@ -1020,7 +1021,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
1020
1021
return tcx. types . err ;
1021
1022
}
1022
1023
1023
- // use a BTreeSet to keep output in a more consistent order
1024
+ // Use a BTreeSet to keep output in a more consistent order.
1024
1025
let mut associated_types = BTreeSet :: default ( ) ;
1025
1026
1026
1027
for tr in traits:: supertraits ( tcx, principal) {
@@ -1059,7 +1060,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
1059
1060
v. sort_by ( |a, b| a. stable_cmp ( tcx, b) ) ;
1060
1061
let existential_predicates = ty:: Binder :: bind ( tcx. mk_existential_predicates ( v. into_iter ( ) ) ) ;
1061
1062
1062
- // Explicitly specified region bound. Use that .
1063
+ // Use explicitly- specified region bound.
1063
1064
let region_bound = if !lifetime. is_elided ( ) {
1064
1065
self . ast_region_to_region ( lifetime, None )
1065
1066
} else {
0 commit comments