Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/coroutine/yield-outside-coroutine-issue-78653.rs

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

9 lines
217 B
Rust
Raw Normal View History

s/generator/coroutine/
2023-10-19 21:46:28 +00:00
#![feature(coroutines)]
Do not ICE when evaluating locals' types of invalid `yield` When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-17 20:44:00 -08:00
fn main() {
yield || for i in 0 { }
s/generator/coroutine/
2023-10-19 21:46:28 +00:00
//~^ ERROR yield expression outside of coroutine literal
Do not ICE when evaluating locals' types of invalid `yield` When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-17 20:44:00 -08:00
//~| ERROR `{integer}` is not an iterator
Error on using `yield` without also using `#[coroutine]` on the closure And suggest adding the `#[coroutine]` to the closure
2024-04-11 13:15:34 +00:00
//~| ERROR `yield` can only be used in
Do not ICE when evaluating locals' types of invalid `yield` When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-17 20:44:00 -08:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1708ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API