2020-02-10 11:03:49 -06:00
|
|
|
// 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
|
|
|
|
|
2023-10-19 16:46:28 -05:00
|
|
|
#![feature(coroutine_trait)]
|
|
|
|
#![feature(coroutines)]
|
2020-02-10 11:03:49 -06:00
|
|
|
|
2023-10-19 11:06:43 -05:00
|
|
|
use std::ops::Coroutine;
|
2020-02-10 11:03:49 -06:00
|
|
|
|
2023-10-19 11:06:43 -05:00
|
|
|
fn gen() -> impl Coroutine<usize> {
|
2020-02-10 11:03:49 -06:00
|
|
|
|_: usize| {
|
|
|
|
println!("-> {}", yield);
|
|
|
|
}
|
|
|
|
}
|
2020-02-10 12:47:52 -06:00
|
|
|
|
|
|
|
fn main() {}
|