diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-07-29 23:50:37 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-29 23:50:37 +1000 |
| commit | b76cb79e7988bafd4043d8d194e18a7fcb3a0366 (patch) | |
| tree | e5d338c0070a7867714755b8ddd904799f926fce /tests/ui/coroutine/postfix-yield-after-cast.rs | |
| parent | 3d5e2fad1cb42fa0a65aa72f65230940a4a4b89a (diff) | |
| parent | 2db97b2f7d877e5db2c892b42ed4deb8d829af14 (diff) | |
| download | rust-b76cb79e7988bafd4043d8d194e18a7fcb3a0366.tar.gz rust-b76cb79e7988bafd4043d8d194e18a7fcb3a0366.zip | |
Rollup merge of #144589 - compiler-errors:postfix-yield-after-cast, r=petrochenkov
Account for `.yield` in illegal postfix operator message Fixes rust-lang/rust#144527
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` + }; +} |
