2023-12-19 12:39:58 -05:00
|
|
|
//@ compile-flags: -Zverbose-internals
|
2020-09-10 23:41:02 -04:00
|
|
|
|
2024-04-11 13:15:34 +00:00
|
|
|
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
|
2020-09-10 23:41:02 -04:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = "Type mismatch test";
|
2024-04-11 13:15:34 +00:00
|
|
|
let coroutine: () = #[coroutine]
|
|
|
|
|| {
|
|
|
|
//~^ ERROR mismatched types
|
2020-09-10 23:41:02 -04:00
|
|
|
yield 1i32;
|
2024-04-11 13:15:34 +00:00
|
|
|
return x;
|
2020-09-10 23:41:02 -04:00
|
|
|
};
|
|
|
|
}
|