Skip to content

Commit

Permalink
fix error message to correctly reference #[default] instead of #[id]
Browse files Browse the repository at this point in the history
  • Loading branch information
gvozdvmozgu authored Sep 26, 2024
1 parent 4a7c955 commit bd2c003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/salsa-macros/src/salsa_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ where
return Ok(());
}

// Check if any field has the `#[id]` attribute.
// Check if any field has the `#[default]` attribute.
for ef in &self.fields {
if ef.has_default_attr {
return Err(syn::Error::new_spanned(
ef.field,
format!("`#[id]` cannot be used with `#[salsa::{}]`", A::KIND),
format!("`#[default]` cannot be used with `#[salsa::{}]`", A::KIND),
));
}
}
Expand Down

0 comments on commit bd2c003

Please sign in to comment.