about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/tests/iter/adapters/skip.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/tests/iter/adapters/skip.rs b/library/core/tests/iter/adapters/skip.rs
index a73d9861dfb..65f235e86aa 100644
--- a/library/core/tests/iter/adapters/skip.rs
+++ b/library/core/tests/iter/adapters/skip.rs
@@ -196,5 +196,8 @@ fn test_skip_nth_back() {
 #[test]
 fn test_skip_non_fused() {
     let non_fused = Unfuse::new(0..10);
+
+    // `Skip` would previously exhaust the iterator in this `next` call and then erroneously try to
+    // advance it further. `Unfuse` tests that this doesn't happen by panicking in that scenario.
     let _ = non_fused.skip(20).next();
 }