@@ -711,7 +711,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
711
711
}
712
712
}
713
713
714
- /// The given trait ref must actually be a trait.
714
+ /// The given trait- ref must actually be a trait.
715
715
pub ( super ) fn instantiate_poly_trait_ref_inner ( & self ,
716
716
trait_ref : & hir:: TraitRef ,
717
717
self_ty : Ty < ' tcx > ,
@@ -981,9 +981,9 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
981
981
982
982
for trait_bound in trait_bounds[ 1 ..] . iter ( ) . rev ( ) {
983
983
// sanity check for non-principal trait bounds
984
- let tr = self . instantiate_poly_trait_ref ( trait_bound,
985
- dummy_self,
986
- & mut Vec :: new ( ) ) ;
984
+ let ( tr , _ ) = self . instantiate_poly_trait_ref ( trait_bound,
985
+ dummy_self,
986
+ & mut Vec :: new ( ) ) ;
987
987
bound_trait_refs. push ( ( tr, trait_bound. span ) ) ;
988
988
}
989
989
bound_trait_refs. push ( ( principal, trait_bounds[ 0 ] . span ) ) ;
@@ -1060,11 +1060,11 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o {
1060
1060
let mut potential_assoc_types_spans = vec ! [ ] ;
1061
1061
if let Some ( potential_assoc_types) = potential_assoc_types {
1062
1062
if potential_assoc_types. len ( ) == associated_types. len ( ) {
1063
- // Only suggest when the amount of missing associated types is equals to the
1063
+ // Only suggest when the number of missing associated types equals the number of
1064
1064
// extra type arguments present, as that gives us a relatively high confidence
1065
1065
// that the user forgot to give the associtated type's name. The canonical
1066
1066
// example would be trying to use `Iterator<isize>` instead of
1067
- // `Iterator<Item= isize>`.
1067
+ // `Iterator<Item = isize>`.
1068
1068
suggest = true ;
1069
1069
potential_assoc_types_spans = potential_assoc_types;
1070
1070
}
0 commit comments