Skip to content

Commit a20b894

Browse files
authored
Merge pull request #579 from gvozdvmozgu/fix-default-attribute-error-message
fix error message to correctly reference `#[default]` instead of `#[id]`
2 parents 4a7c955 + bd2c003 commit a20b894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/salsa-macros/src/salsa_struct.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ where
156156
return Ok(());
157157
}
158158

159-
// Check if any field has the `#[id]` attribute.
159+
// Check if any field has the `#[default]` attribute.
160160
for ef in &self.fields {
161161
if ef.has_default_attr {
162162
return Err(syn::Error::new_spanned(
163163
ef.field,
164-
format!("`#[id]` cannot be used with `#[salsa::{}]`", A::KIND),
164+
format!("`#[default]` cannot be used with `#[salsa::{}]`", A::KIND),
165165
));
166166
}
167167
}

0 commit comments

Comments
 (0)