From bd2c0036dc99523525b0074e46d58ed50079d65b Mon Sep 17 00:00:00 2001 From: Andrey Nikolaev Date: Thu, 26 Sep 2024 15:57:31 -0700 Subject: [PATCH] fix error message to correctly reference `#[default]` instead of `#[id]` --- components/salsa-macros/src/salsa_struct.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/salsa-macros/src/salsa_struct.rs b/components/salsa-macros/src/salsa_struct.rs index b1e9ad2c..54808240 100644 --- a/components/salsa-macros/src/salsa_struct.rs +++ b/components/salsa-macros/src/salsa_struct.rs @@ -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), )); } }