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 eef5084 commit f11670aCopy full SHA for f11670a
clippy_lints/src/redundant_field_names.rs
@@ -57,7 +57,10 @@ impl EarlyLintPass for RedundantFieldNames {
57
continue;
58
}
59
if let ExprKind::Path(None, path) = &field.expr.node {
60
- if path.segments.len() == 1 && path.segments[0].ident == field.ident {
+ if path.segments.len() == 1
61
+ && path.segments[0].ident == field.ident
62
+ && path.segments[0].args.is_none()
63
+ {
64
span_lint_and_sugg(
65
cx,
66
REDUNDANT_FIELD_NAMES,
tests/ui/redundant_field_names.rs
@@ -71,3 +71,14 @@ fn main() {
71
let _ = RangeInclusive::new(start, end);
72
let _ = RangeToInclusive { end: end };
73
74
+
75
+fn issue_3476() {
76
+ fn foo<T>() {
77
+ }
78
79
+ struct S {
80
+ foo: fn(),
81
82
83
+ S { foo: foo::<i32> };
84
+}
0 commit comments