Skip to main content

rustc_attr_parsing/attributes/
loop_match.rs

1use rustc_feature::AttributeStability;
2
3use super::prelude::*;
4
5pub(crate) struct LoopMatchParser;
6impl NoArgsAttributeParser for LoopMatchParser {
7    const PATH: &[Symbol] = &[sym::loop_match];
8    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
9    const STABILITY: AttributeStability = AttributeStability::Unstable {
    gate_name: rustc_span::sym::loop_match,
    gate_check: rustc_feature::Features::loop_match,
    notes: &[],
}unstable!(loop_match);
10    const CREATE: fn(Span) -> AttributeKind = AttributeKind::LoopMatch;
11}
12
13pub(crate) struct ConstContinueParser;
14impl NoArgsAttributeParser for ConstContinueParser {
15    const PATH: &[Symbol] = &[sym::const_continue];
16    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Expression)]);
17    const STABILITY: AttributeStability = AttributeStability::Unstable {
    gate_name: rustc_span::sym::loop_match,
    gate_check: rustc_feature::Features::loop_match,
    notes: &[],
}unstable!(loop_match);
18    const CREATE: fn(Span) -> AttributeKind = AttributeKind::ConstContinue;
19}