diff options
Diffstat (limited to 'src/tools/clippy/src/docs/init_numbered_fields.txt')
-rw-r--r-- | src/tools/clippy/src/docs/init_numbered_fields.txt | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/tools/clippy/src/docs/init_numbered_fields.txt b/src/tools/clippy/src/docs/init_numbered_fields.txt deleted file mode 100644 index ba40af6a5..000000000 --- a/src/tools/clippy/src/docs/init_numbered_fields.txt +++ /dev/null @@ -1,24 +0,0 @@ -### What it does -Checks for tuple structs initialized with field syntax. -It will however not lint if a base initializer is present. -The lint will also ignore code in macros. - -### Why is this bad? -This may be confusing to the uninitiated and adds no -benefit as opposed to tuple initializers - -### Example -``` -struct TupleStruct(u8, u16); - -let _ = TupleStruct { - 0: 1, - 1: 23, -}; - -// should be written as -let base = TupleStruct(1, 23); - -// This is OK however -let _ = TupleStruct { 0: 42, ..base }; -```
\ No newline at end of file |