diff options
Diffstat (limited to 'src/test/ui/generator/issue-102645.rs')
-rw-r--r-- | src/test/ui/generator/issue-102645.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/generator/issue-102645.rs b/src/test/ui/generator/issue-102645.rs new file mode 100644 index 000000000..0589c5a00 --- /dev/null +++ b/src/test/ui/generator/issue-102645.rs @@ -0,0 +1,23 @@ +// compile-flags: -Zdrop-tracking + +#![feature(generators, generator_trait)] + +use std::ops::Generator; +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 function takes 1 argument but 0 arguments were supplied + // This type error is required to reproduce the ICE... +} + +fn _zzz() { + () +} |