rustc_attr_parsing/attributes/body.rs
1//! Attributes that can be found in function body.
2
3use rustc_feature::AttributeStability;
4
5use super::prelude::*;
6
7pub(crate) struct CoroutineParser;
8
9impl NoArgsAttributeParser for CoroutineParser {
10 const PATH: &[Symbol] = &[sym::coroutine];
11 const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Closure)]);
12 const STABILITY: AttributeStability = unstable!(coroutines);
13 const CREATE: fn(rustc_span::Span) -> AttributeKind = |_| AttributeKind::Coroutine;
14}