bevy_lint/lints/nursery/
mod.rs

1//! Unstable lints that may be removed at any time for any reason.
2//!
3//! These lints are **allow** by default.
4
5use rustc_lint::{Level, Lint, LintStore};
6
7use crate::lint::LintGroup;
8
9pub mod duplicate_bevy_dependencies;
10pub mod zst_query;
11
12pub(crate) struct Nursery;
13
14impl LintGroup for Nursery {
15    const NAME: &str = "bevy::nursery";
16    const LEVEL: Level = Level::Allow;
17    const LINTS: &[&Lint] = &[
18        duplicate_bevy_dependencies::DUPLICATE_BEVY_DEPENDENCIES,
19        zst_query::ZST_QUERY,
20    ];
21
22    fn register_passes(store: &mut LintStore) {
23        // `duplicate_bevy_dependencies` is a Cargo lint, so it does not have its own pass.
24        store.register_late_pass(|_| Box::new(zst_query::ZstQuery::default()));
25    }
26}