diff options
Diffstat (limited to 'tests/ui/coroutine/postfix-yield-after-cast.rs')
| -rw-r--r-- | tests/ui/coroutine/postfix-yield-after-cast.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/coroutine/postfix-yield-after-cast.rs b/tests/ui/coroutine/postfix-yield-after-cast.rs new file mode 100644 index 00000000000..472efb9f513 --- /dev/null +++ b/tests/ui/coroutine/postfix-yield-after-cast.rs @@ -0,0 +1,10 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/144527>. + +#![feature(yield_expr, coroutines)] + +fn main() { + #[coroutine] || { + 0 as u8.yield + //~^ ERROR cast cannot be followed by `.yield` + }; +} |
