rust/tests/ui/coroutine/invalid_attr_usage.rs

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

12 lines
241 B
Rust
Raw Normal View History

2024-08-01 05:03:10 -05:00
//! The `coroutine` attribute is only allowed on closures.
#![feature(coroutines)]
#[coroutine]
//~^ ERROR: attribute should be applied to closures
struct Foo;
#[coroutine]
//~^ ERROR: attribute should be applied to closures
fn main() {}