We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 486fb44 commit 0b346beCopy full SHA for 0b346be
compiler/rustc_lint/src/traits.rs
@@ -161,11 +161,11 @@ impl<'tcx> LateLintPass<'tcx> for DuplicateTraitBounds {
161
// If inserting the trait bound into the set returns `false`,
162
// there is a duplicate.
163
if !set.insert(did) {
164
- let span = polytraitref.span;
165
- cx.struct_span_lint(DUP_TRAIT_BOUNDS, span, |lint| {
+ let span_of_dup = polytraitref.span;
+ cx.struct_span_lint(DUP_TRAIT_BOUNDS, span_of_dup, |lint| {
166
let msg = format!("duplicate trait bound");
167
lint.build(&msg)
168
- .span_help(span, "remove the duplicate trait bound")
+ .span_help(span_of_dup, "Remove this duplicate trait bound")
169
.emit();
170
});
171
};
0 commit comments