about summary refs log tree commit diff
path: root/src/docs/writeln_empty_string.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/writeln_empty_string.txt')
-rw-r--r--src/docs/writeln_empty_string.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/docs/writeln_empty_string.txt b/src/docs/writeln_empty_string.txt
new file mode 100644
index 00000000000..3b3aeb79a48
--- /dev/null
+++ b/src/docs/writeln_empty_string.txt
@@ -0,0 +1,16 @@
+### What it does
+This lint warns when you use `writeln!(buf, "")` to
+print a newline.
+
+### Why is this bad?
+You should use `writeln!(buf)`, which is simpler.
+
+### Example
+```
+writeln!(buf, "");
+```
+
+Use instead:
+```
+writeln!(buf);
+```
\ No newline at end of file