summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21655.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-21655.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-21655.rs b/src/test/ui/issues/issue-21655.rs
new file mode 100644
index 000000000..d1cd4ec7b
--- /dev/null
+++ b/src/test/ui/issues/issue-21655.rs
@@ -0,0 +1,12 @@
+// run-pass
+
+fn test(it: &mut dyn Iterator<Item=i32>) {
+ for x in it {
+ assert_eq!(x, 1)
+ }
+}
+
+fn main() {
+ let v = vec![1];
+ test(&mut v.into_iter())
+}