summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice_exacte_size.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/crashes/ice_exacte_size.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/crashes/ice_exacte_size.rs b/src/tools/clippy/tests/ui/crashes/ice_exacte_size.rs
new file mode 100644
index 000000000..30e4b11ec
--- /dev/null
+++ b/src/tools/clippy/tests/ui/crashes/ice_exacte_size.rs
@@ -0,0 +1,19 @@
+#![deny(clippy::all)]
+
+/// Test for https://github.com/rust-lang/rust-clippy/issues/1336
+
+#[allow(dead_code)]
+struct Foo;
+
+impl Iterator for Foo {
+ type Item = ();
+
+ fn next(&mut self) -> Option<()> {
+ let _ = self.len() == 0;
+ unimplemented!()
+ }
+}
+
+impl ExactSizeIterator for Foo {}
+
+fn main() {}