about summary refs log tree commit diff
path: root/src/docs/iter_next_loop.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/iter_next_loop.txt')
-rw-r--r--src/docs/iter_next_loop.txt17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/docs/iter_next_loop.txt b/src/docs/iter_next_loop.txt
deleted file mode 100644
index b33eb39d6e1..00000000000
--- a/src/docs/iter_next_loop.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-### What it does
-Checks for loops on `x.next()`.
-
-### Why is this bad?
-`next()` returns either `Some(value)` if there was a
-value, or `None` otherwise. The insidious thing is that `Option<_>`
-implements `IntoIterator`, so that possibly one value will be iterated,
-leading to some hard to find bugs. No one will want to write such code
-[except to win an Underhanded Rust
-Contest](https://www.reddit.com/r/rust/comments/3hb0wm/underhanded_rust_contest/cu5yuhr).
-
-### Example
-```
-for x in y.next() {
-    ..
-}
-```
\ No newline at end of file