]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/map_flatten.fixed
Add test to map_flatten with an Option
[rust.git] / tests / ui / map_flatten.fixed
index 51732e02be4fe9244a703f4c2547b275e160f891..7ac368878ab7ea341ea7c71c4896eb7be5cf6813 100644 (file)
@@ -5,4 +5,5 @@
 
 fn main() {
     let _: Vec<_> = vec![5_i8; 6].into_iter().flat_map(|x| 0..x).collect();
+    let _: Option<_> = (Some(Some(1))).and_then(|x| x);
 }