diff options
| author | Christiaan Dirkx <christiaan@dirkx.email> | 2020-11-22 09:08:04 +0100 |
|---|---|---|
| committer | Christiaan Dirkx <christiaan@dirkx.email> | 2020-11-30 02:47:32 +0100 |
| commit | be554c4101df2a9ac65d40962ee37ece85d517bf (patch) | |
| tree | de404d29144c6db9c24e81a2f6f8cb8d545abbe9 /library/core/tests/iter.rs | |
| parent | 349b3b324dade7ca638091db93ba08bbc443c63d (diff) | |
| download | rust-be554c4101df2a9ac65d40962ee37ece85d517bf.tar.gz rust-be554c4101df2a9ac65d40962ee37ece85d517bf.zip | |
Make ui test that are run-pass and do not test the compiler itself library tests
Diffstat (limited to 'library/core/tests/iter.rs')
| -rw-r--r-- | library/core/tests/iter.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/core/tests/iter.rs b/library/core/tests/iter.rs index 6b8a989fa42..ec4b49da384 100644 --- a/library/core/tests/iter.rs +++ b/library/core/tests/iter.rs @@ -3493,3 +3493,15 @@ fn test_flatten_non_fused_inner() { assert_eq!(iter.next(), Some(1)); assert_eq!(iter.next(), None); } + +#[test] +pub fn extend_for_unit() { + let mut x = 0; + { + let iter = (0..5).map(|_| { + x += 1; + }); + ().extend(iter); + } + assert_eq!(x, 5); +} |
