Stage in rustc_attr_parsing::context - Rust
Description: API documentation for the Rust `Stage` trait in crate `rustc_attr_parsing`.

Skip to main content

## Stage

# Trait Stage

Source

    pub trait Stage:
        Sized
        + 'static
        + Sealed {
        type Id: Copy;

        // Required methods
        fn parsers() -> &'static LazyLock<GroupTypeInner<Self>>;
        fn emit_err<'sess>(
            &self,
            sess: &'sess Session,
            diag: impl for<'x> Diagnostic<'x>,
        ) -> ErrorGuaranteed;
        fn should_emit(&self) -> ShouldEmit;
    }

## Required Associated Types§

Source

#### type Id: Copy

## Required Methods§

Source

#### fn parsers() -> &'static LazyLock<GroupTypeInner<Self>>

Source

#### fn emit_err<'sess>( &self, sess: &'sess Session, diag: impl for<'x> Diagnostic<'x>, ) -> ErrorGuaranteed

Source

#### fn should_emit(&self) -> ShouldEmit

## 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 Stage for Early

Source§

#### type Id = NodeId

Source§

### impl Stage for Late

Source§

#### type Id = HirId