Skip to main content

LintLevelsProvider

Trait LintLevelsProvider 

Source
pub trait LintLevelsProvider {
    type LintExpectationId: Copy + Debug + Into<LintExpectationId>;

    // Required methods
    fn current_specs(
        &self,
    ) -> &FxIndexMap<LintId, LevelSpec<Self::LintExpectationId>>;
    fn insert(
        &mut self,
        id: LintId,
        level_spec: LevelSpec<Self::LintExpectationId>,
    );
    fn get_lint_level_spec(
        &self,
        lint: &'static Lint,
        sess: &Session,
    ) -> LevelSpec<Self::LintExpectationId>;
    fn push_expectation(
        &mut self,
        id: Self::LintExpectationId,
        expectation: LintExpectation,
    );
    fn mk_lint_expectation_id(
        &self,
        attr_id: AttrId,
        attr_index: usize,
        lint_index: u16,
    ) -> Self::LintExpectationId;
}

Required Associated Types§

Required Methods§

Source

fn current_specs( &self, ) -> &FxIndexMap<LintId, LevelSpec<Self::LintExpectationId>>

Source

fn insert(&mut self, id: LintId, level_spec: LevelSpec<Self::LintExpectationId>)

Source

fn get_lint_level_spec( &self, lint: &'static Lint, sess: &Session, ) -> LevelSpec<Self::LintExpectationId>

Source

fn push_expectation( &mut self, id: Self::LintExpectationId, expectation: LintExpectation, )

Source

fn mk_lint_expectation_id( &self, attr_id: AttrId, attr_index: usize, lint_index: u16, ) -> Self::LintExpectationId

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§