about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/attributes/loop_match.rs
blob: 528090b8673dcb3b5776393b3c53e3acf46fae92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::prelude::*;

pub(crate) struct LoopMatchParser;
impl<S: Stage> NoArgsAttributeParser<S> for LoopMatchParser {
    const PATH: &[Symbol] = &[sym::loop_match];
    const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
    const CREATE: fn(Span) -> AttributeKind = AttributeKind::LoopMatch;
}

pub(crate) struct ConstContinueParser;
impl<S: Stage> NoArgsAttributeParser<S> for ConstContinueParser {
    const PATH: &[Symbol] = &[sym::const_continue];
    const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
    const CREATE: fn(Span) -> AttributeKind = AttributeKind::ConstContinue;
}