diff options
Diffstat (limited to 'tests/ui/impl-trait/fallback.rs')
-rw-r--r-- | tests/ui/impl-trait/fallback.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/fallback.rs b/tests/ui/impl-trait/fallback.rs new file mode 100644 index 000000000..1e6eb5bb3 --- /dev/null +++ b/tests/ui/impl-trait/fallback.rs @@ -0,0 +1,9 @@ +// check-pass + +fn take_edge_counters( + x: &mut Option<Vec<i32>>, +) -> Option<impl Iterator<Item = i32>> { + x.take().map_or(None, |m| Some(m.into_iter())) +} + +fn main() {} |