@@ -702,7 +702,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
702
702
}
703
703
704
704
/// Instantiates the path for the given trait reference, assuming that it's
705
- /// bound to a valid trait type. Returns the def-ID for the defining trait.
705
+ /// bound to a valid trait type. Returns the `DefId` of the defining trait.
706
706
/// The type _cannot_ be a type other than a trait type.
707
707
///
708
708
/// If the `projections` argument is `None`, then assoc type bindings like `Foo<T = X>`
@@ -994,7 +994,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
994
994
995
995
// Expand trait aliases recursively and check that only one regular (non-auto) trait
996
996
// is used and no 'maybe' bounds are used.
997
- let expanded_traits = traits:: expand_trait_aliases ( tcx, bound_trait_refs. clone ( ) ) ;
997
+ let expanded_traits = traits:: expand_trait_aliases ( tcx, bound_trait_refs. iter ( ) . cloned ( ) ) ;
998
998
let ( mut auto_traits, regular_traits) : ( Vec < _ > , Vec < _ > ) =
999
999
expanded_traits. partition ( |i| tcx. trait_is_auto ( i. trait_ref ( ) . def_id ( ) ) ) ;
1000
1000
if regular_traits. len ( ) > 1 {
@@ -1240,7 +1240,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
1240
1240
}
1241
1241
1242
1242
// Search for a bound on a type parameter which includes the associated item
1243
- // given by `assoc_name`. `ty_param_def_id` is the `DefId` for the type parameter
1243
+ // given by `assoc_name`. `ty_param_def_id` is the `DefId` of the type parameter
1244
1244
// This function will fail if there are no suitable bounds or there is
1245
1245
// any ambiguity.
1246
1246
fn find_bound_for_assoc_item ( & self ,
0 commit comments