Skip to content

Commit

Permalink
Merge pull request #579 from gvozdvmozgu/fix-default-attribute-error-…
Browse files Browse the repository at this point in the history
…message

fix error message to correctly reference `#[default]` instead of `#[id]`
  • Loading branch information
MichaReiser authored Sep 27, 2024
2 parents 4a7c955 + bd2c003 commit a20b894
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 a20b894

Please sign in to comment.