Skip to content

Commit

Permalink
feat: write docs for macro
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 committed Jan 14, 2025
1 parent 6579112 commit 95a715c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bevy_lint/src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ macro_rules! declare_bevy_lint {
};
}

/// Creates a new [`LintPass`](rustc_lint::LintPass).
///
/// This is based on [`declare_lint_pass!`](rustc_lint_defs::declare_lint_pass), but supports more
/// options.
///
/// # Example
///
/// ```ignore
/// declare_bevy_lint_pass! {
/// // Declares which lints are emitted by this lint pass.
/// pub LintPassName => [LINT_NAME.lint],
///
/// // The following are optional fields, and may be excluded.
/// //
/// // Declares fields of the lint pass that are set when `LintPassName::default()` is called.
/// @default = {
/// component_sym: Symbol = Symbol::intern("component"),
/// },
/// }
/// ```
#[macro_export]
#[doc(hidden)]
macro_rules! declare_bevy_lint_pass {
Expand Down

0 comments on commit 95a715c

Please sign in to comment.