diff options
Diffstat (limited to 'src/docs/empty_drop.txt')
| -rw-r--r-- | src/docs/empty_drop.txt | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/docs/empty_drop.txt b/src/docs/empty_drop.txt deleted file mode 100644 index d0c0c24a9c8..00000000000 --- a/src/docs/empty_drop.txt +++ /dev/null @@ -1,20 +0,0 @@ -### What it does -Checks for empty `Drop` implementations. - -### Why is this bad? -Empty `Drop` implementations have no effect when dropping an instance of the type. They are -most likely useless. However, an empty `Drop` implementation prevents a type from being -destructured, which might be the intention behind adding the implementation as a marker. - -### Example -``` -struct S; - -impl Drop for S { - fn drop(&mut self) {} -} -``` -Use instead: -``` -struct S; -``` \ No newline at end of file |
