Skip to main content

rustc_attr_parsing/attributes/
loop_match.rs

1use super::prelude::*;
2
3pub(crate) struct LoopMatchParser;
4impl<S: Stage> NoArgsAttributeParser<S> for LoopMatchParser {
5    const PATH: &[Symbol] = &[sym::loop_match];
6    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
7    const CREATE: fn(Span) -> AttributeKind = AttributeKind::LoopMatch;
8}
9
10pub(crate) struct ConstContinueParser;
11impl<S: Stage> NoArgsAttributeParser<S> for ConstContinueParser {
12    const PATH: &[Symbol] = &[sym::const_continue];
13    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
14    const CREATE: fn(Span) -> AttributeKind = AttributeKind::ConstContinue;
15}