Skip to content

Commit 30846b1

Browse files
committed
add comments in code to clarify and fix typo
1 parent 32e2511 commit 30846b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/implied_bounds_in_impls.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ fn emit_lint(
5656
poly_trait: &rustc_hir::PolyTraitRef<'_>,
5757
opaque_ty: &rustc_hir::OpaqueTy<'_>,
5858
index: usize,
59+
// The bindings that were implied
5960
implied_bindings: &[rustc_hir::TypeBinding<'_>],
61+
// The original bindings that `implied_bindings` are implied from
6062
implied_by_bindings: &[rustc_hir::TypeBinding<'_>],
6163
implied_by_args: &[GenericArg<'_>],
6264
implied_by_span: Span,
@@ -69,7 +71,7 @@ fn emit_lint(
6971
poly_trait.span,
7072
&format!("this bound is already specified as the supertrait of `{implied_by}`"),
7173
|diag| {
72-
// If we suggest removing a bound, we may also need extend the span
74+
// If we suggest removing a bound, we may also need to extend the span
7375
// to include the `+` token that is ahead or behind,
7476
// so we don't end up with something like `impl + B` or `impl A + `
7577

0 commit comments

Comments
 (0)