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