What it does
What does this lint do?
Detects if someone has decided to create a tuple struct by its named (.0, .1 etc) fields.
See this playground for proof that this actually works.
Categories (optional)
What is the advantage of the recommended code over the original code
Constructing tuple structs by their named fields is extremely unidiomatic, verbose and unclear.
Drawbacks
May be spurious if users are using struct update syntax with tuple structs.
Example
struct MyTuple(isize, isize);
let my_tuple = MyTuple {
0: 1,
1: 2,
};
Could be written as:
struct MyTuple(isize, isize);
let my_tuple = MyTuple(0, 1);