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 7dac0ed commit 4617feaCopy full SHA for 4617fea
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
@@ -68,3 +68,14 @@ fn main() {
68
let _ = RangeInclusive::new(start, end);
69
let _ = RangeToInclusive { end: end };
70
71
+
72
+fn issue_3476() {
73
+ fn foo<T>() {
74
+ }
75
76
+ struct S {
77
+ foo: fn(),
78
79
80
+ S { foo: foo::<i32> };
81
+}
0 commit comments