NoArgsAttributeParser

Trait NoArgsAttributeParser 

Source
pub(crate) trait NoArgsAttributeParser<S: Stage>: 'static {
    const PATH: &[Symbol];
    const ON_DUPLICATE: OnDuplicate<S>;
    const ALLOWED_TARGETS: AllowedTargets;
    const CREATE: fn(Span) -> AttributeKind;
    const TYPE: AttributeType = AttributeType::Normal;
}
Expand description

An even simpler version of SingleAttributeParser: now automatically check that there are no arguments provided to the attribute.

WithoutArgs<T> where T: NoArgsAttributeParser implements SingleAttributeParser.

Required Associated Constants§

Provided Associated Constants§

Source

const TYPE: AttributeType = AttributeType::Normal

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S: Stage> NoArgsAttributeParser<S> for CoroutineParser

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ColdParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::Cold as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for NoMangleParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::NoMangle as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for TrackCallerParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::TrackCaller as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ExportStableParser

Source§

impl<S: Stage> NoArgsAttributeParser<S> for FfiConstParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::FfiConst as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for FfiPureParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::FfiPure as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for StdInternalSymbolParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::StdInternalSymbol as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::AsPtr as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for AutomaticallyDerivedParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::AutomaticallyDerived as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for PassByValueParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::PassByValue as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for PubTransparentParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::PubTransparent as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ConstContinueParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::ConstContinue as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for LoopMatchParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::LoopMatch as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for AllowInternalUnsafeParser

Source§

impl<S: Stage> NoArgsAttributeParser<S> for MacroEscapeParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets = MACRO_USE_ALLOWED_TARGETS

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::MacroEscape as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for NoImplicitPreludeParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::NoImplicitPrelude as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for NonExhaustiveParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::NonExhaustive as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ProcMacroAttributeParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets = PROC_MACRO_ALLOWED_TARGETS

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::ProcMacroAttribute as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ProcMacroParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets = PROC_MACRO_ALLOWED_TARGETS

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::ProcMacro as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for MayDangleParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(span: Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::MayDangle as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ConstStabilityIndirectParser

Source§

impl<S: Stage> NoArgsAttributeParser<S> for AllowIncoherentImplParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::AllowIncoherentImpl as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for CoherenceIsCoreParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const TYPE: AttributeType = AttributeType::CrateLevel

Source§

const CREATE: fn(Span) -> AttributeKind

Source§

impl<S: Stage> NoArgsAttributeParser<S> for CoinductiveParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::Coinductive as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ConstTraitParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::ConstTrait as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for DenyExplicitImplParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::DenyExplicitImpl as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for DoNotImplementViaObjectParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::DoNotImplementViaObject as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for FundamentalParser

Source§

impl<S: Stage> NoArgsAttributeParser<S> for MarkerParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::Marker as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for ParenSugarParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::ParenSugar as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for PointeeParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::Pointee as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for SpecializationTraitParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::SpecializationTrait as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for TypeConstParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::TypeConst as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}

Source§

impl<S: Stage> NoArgsAttributeParser<S> for UnsafeSpecializationMarkerParser

Source§

const PATH: &[Symbol]

Source§

const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error

Source§

const ALLOWED_TARGETS: AllowedTargets

Source§

const CREATE: fn(Span) -> AttributeKind = {rustc_hir::attrs::AttributeKind::UnsafeSpecializationMarker as fn(rustc_span::Span) -> rustc_hir::attrs::AttributeKind}