summaryrefslogtreecommitdiffstats
path: root/tests/ui/coroutine/issue-102645.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coroutine/issue-102645.rs')
-rw-r--r--tests/ui/coroutine/issue-102645.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/coroutine/issue-102645.rs b/tests/ui/coroutine/issue-102645.rs
new file mode 100644
index 000000000..a0263510e
--- /dev/null
+++ b/tests/ui/coroutine/issue-102645.rs
@@ -0,0 +1,21 @@
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+use std::pin::Pin;
+
+fn main() {
+ let mut a = 5;
+ let mut b = || {
+ let d = 6;
+ yield;
+ _zzz(); // #break
+ a = d;
+ };
+ Pin::new(&mut b).resume();
+ //~^ ERROR this method takes 1 argument but 0 arguments were supplied
+ // This type error is required to reproduce the ICE...
+}
+
+fn _zzz() {
+ ()
+}