@@ -54,7 +54,7 @@ struct TyParamState {
5454 /// fn f<T: Iterator<Item = P>, P: Copy>() -> P {}
5555 /// ^ ^ ^
5656 ///
57- /// After having visited everything in the item, the use_count of the generic parameter `P`
57+ /// After having visited everything in the item, the ` use_count` of the generic parameter `P`
5858 /// is 3.
5959 /// We then check uses of `P` in the where clause and count 2 valid uses. `3 - 2 != 0` so at
6060 /// this point we see that we shouldn't lint.
@@ -186,7 +186,7 @@ impl ItemState {
186186 ///
187187 /// - `U: Trait` if exactly one `T: Trait<Assoc = U>` bound exists in `trait_bounds` (i.e.,
188188 /// exactly one trait bound that has `U` as its associated type and is not used anywhere else,
189- /// ensured by use_count == 0). Add `Emission::TyParamBound(U: Trait)` to `T: Trait<Assoc =
189+ /// ensured by ` use_count` == 0). Add `Emission::TyParamBound(U: Trait)` to `T: Trait<Assoc =
190190 /// U>`s [`TraitBound::emissions`].
191191 ///
192192 /// Note that synthetic/anonymous generic parameters introduced by `impl Trait` (e.g. `T:
@@ -277,7 +277,7 @@ impl ItemState {
277277 // TODO: REALLY dont use + iterate a hashmap here and isntead just sort?
278278 let grouped_emissions = emissions
279279 . iter ( )
280- . into_group_map_by ( |e| e. assoc_ty ( trait_path_segment, & self ) ) ;
280+ . into_group_map_by ( |e| e. assoc_ty ( trait_path_segment, self ) ) ;
281281
282282 if let Some ( args) = trait_path_segment. args
283283 && let Some ( args_span) = args. span ( )
@@ -350,7 +350,7 @@ impl ItemState {
350350 new_bounds += assoc. as_str ( ) ;
351351 new_bounds += ": " ;
352352
353- Emission :: append_bounds ( & emissions, cx, & mut new_bounds, false ) ;
353+ Emission :: append_bounds ( emissions, cx, & mut new_bounds, false ) ;
354354 }
355355
356356 new_bounds += ">" ;
@@ -412,24 +412,12 @@ impl_lint_pass!(ManualAssocTypeBounds => [MANUAL_ASSOC_TYPE_BOUNDS]);
412412#[ derive( Debug ) ]
413413enum Emission {
414414 ProjectionBound {
415- // /// fn f<T>() where T: Iterator, <T as Iterator>::Item: Copy + Sized, {}
416- // /// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
417- // predicate_span: Span,
418415 predicate_index : usize ,
419- /// fn f<T>() where T: Iterator, <T as Iterator>::Item: Copy + Sized, {}
420- /// ^^^^^^^^^^^^
421416 bounds_span : Span ,
422- /// fn f<T>() where T: Iterator, <T as Iterator>::Item: Copy + Sized, {}
423- /// ^^^^
424417 assoc_type : Ident ,
425418 } ,
426419 TyParamBound {
427- /// fn f<T, P>() where T: Iterator<Item = P>, P: Copy + Sized, {}
428- /// ^^^^^^^^^^^^^^^
429- // predicate_span: Span,
430420 predicate_index : usize ,
431- /// fn f<T, P>() where T: Iterator<Item = P>, P: Copy + Sized, {}
432- /// ^^^^^^^^^^^^
433421 bounds_span : Span ,
434422 /// Index into `ItemState::ty_params`
435423 ty_param_index : usize ,
0 commit comments