rust/tests/ui/coroutine/auxiliary/xcrate-reachable.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
212 B
Rust
Raw Normal View History

2023-10-19 16:46:28 -05:00
#![feature(coroutines, coroutine_trait)]
2023-10-19 11:06:43 -05:00
use std::ops::Coroutine;
fn msg() -> u32 {
0
}
2023-10-19 11:06:43 -05:00
pub fn foo() -> impl Coroutine<(), Yield = (), Return = u32> {
|| {
yield;
return msg();
}
}