diff --git a/src/test/ui/generator/issue-69017.rs b/src/test/ui/generator/issue-69017.rs new file mode 100644 index 0000000000000..7b1d87efc9443 --- /dev/null +++ b/src/test/ui/generator/issue-69017.rs @@ -0,0 +1,16 @@ +// This issue reproduces an ICE on compile +// Fails on 2020-02-08 nightly +// regressed commit: https://github.com/rust-lang/rust/commit/f8fd4624474a68bd26694eff3536b9f3a127b2d3 +// +// check-pass + +#![feature(generator_trait)] +#![feature(generators)] + +use std::ops::Generator; + +fn gen() -> impl Generator { + |_: usize| { + println!("-> {}", yield); + } +}