Skip to content

Commit 0a3cddb

Browse files
committed
chore: remove @default capability from declare_bevy_lint_pass!
It's no longer used, now that we pre-intern symbols.
1 parent ad772a0 commit 0a3cddb

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

bevy_lint/src/lint.rs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@ macro_rules! declare_bevy_lint {
148148
/// declare_bevy_lint_pass! {
149149
/// // Declares which lints are emitted by this lint pass.
150150
/// pub LintPassName => [LINT_NAME],
151-
///
152-
/// // The following are optional fields, and may be omitted.
153-
/// //
154-
/// // Declares fields of the lint pass that are set when `LintPassName::default()` is called.
155-
/// @default = {
156-
/// component: Symbol = Symbol::intern("component"),
157-
/// },
158151
/// }
159152
/// ```
160153
#[macro_export]
@@ -163,25 +156,10 @@ macro_rules! declare_bevy_lint_pass {
163156
(
164157
$(#[$attr:meta])*
165158
$vis:vis $name:ident => [$($lint:expr),* $(,)?],
166-
167-
$(
168-
@default = {
169-
$($default_field:ident: $default_ty:ty = $default_value:expr),* $(,)?
170-
},
171-
)?
172159
) => {
173160
$(#[$attr])*
174-
$vis struct $name {
175-
$($($default_field: $default_ty),*)?
176-
}
177-
178-
impl ::std::default::Default for $name {
179-
fn default() -> Self {
180-
Self {
181-
$($($default_field: $default_value),*)?
182-
}
183-
}
184-
}
161+
#[derive(Default)]
162+
$vis struct $name;
185163

186164
::rustc_lint_defs::impl_lint_pass!($name => [$($lint),*]);
187165
};

0 commit comments

Comments
 (0)