Files
rust/tests/ui/coroutine/const_gen_fn.rs

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

14 lines
356 B
Rust
Raw Normal View History

2024-09-11 18:22:37 -04:00
//@ edition:2024
#![feature(gen_blocks)]
const gen fn a() {}
//~^ ERROR functions cannot be both `const` and `gen`
//~^^ ERROR `gen` fn bodies are not allowed in constant functions
2024-09-11 18:22:37 -04:00
const async gen fn b() {}
//~^ ERROR functions cannot be both `const` and `async gen`
//~^^ ERROR `async gen` fn bodies are not allowed in constant functions
2024-09-11 18:22:37 -04:00
fn main() {}