rustc_attr_parsing/attributes/splat.rs
1//! Attribute parsing for the `#[splat]` function argument overloading attribute.
2//! This attribute modifies typecheck to support overload resolution, then modifies codegen for performance.
3
4use rustc_feature::AttributeStability;
5
6use super::prelude::*;
7
8pub(crate) struct SplatParser;
9
10impl NoArgsAttributeParser for SplatParser {
11 const PATH: &[Symbol] = &[sym::splat];
12 const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Param)]);
13 const STABILITY: AttributeStability =
14 unstable!(splat, "the `#[splat]` attribute is experimental");
15 const CREATE: fn(Span) -> AttributeKind = AttributeKind::Splat;
16}