]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/flat_map_identity.fixed
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / flat_map_identity.fixed
diff --git a/src/tools/clippy/tests/ui/flat_map_identity.fixed b/src/tools/clippy/tests/ui/flat_map_identity.fixed
new file mode 100644 (file)
index 0000000..dfe3bd4
--- /dev/null
@@ -0,0 +1,14 @@
+// run-rustfix
+
+#![allow(unused_imports)]
+#![warn(clippy::flat_map_identity)]
+
+use std::convert;
+
+fn main() {
+    let iterator = [[0, 1], [2, 3], [4, 5]].iter();
+    let _ = iterator.flatten();
+
+    let iterator = [[0, 1], [2, 3], [4, 5]].iter();
+    let _ = iterator.flatten();
+}