diff --git a/components/salsa-macros/src/interned.rs b/components/salsa-macros/src/interned.rs index 86c244ed8..d9837f6d0 100644 --- a/components/salsa-macros/src/interned.rs +++ b/components/salsa-macros/src/interned.rs @@ -43,7 +43,7 @@ impl AllowedOptions for InternedStruct { const NO_LIFETIME: bool = true; - const NON_UPDATE_TYPES: bool = false; + const NON_UPDATE_TYPES: bool = true; const SINGLETON: bool = true; diff --git a/components/salsa-macros/src/options.rs b/components/salsa-macros/src/options.rs index c73e4e485..b0d9f299d 100644 --- a/components/salsa-macros/src/options.rs +++ b/components/salsa-macros/src/options.rs @@ -268,18 +268,15 @@ impl syn::parse::Parse for Options { let content; parenthesized!(content in input); let ident = syn::Ident::parse_any(&content)?; - if ident == "non_update_return_type" { + if ident == "non_update_types" { if let Some(old) = options.non_update_types.replace(ident) { return Err(syn::Error::new( old.span(), - "option `non_update_return_type` provided twice", + "option `non_update_types` provided twice", )); } } else { - return Err(syn::Error::new( - ident.span(), - "expected `non_update_return_type`", - )); + return Err(syn::Error::new(ident.span(), "expected `non_update_types`")); } } else { return Err(syn::Error::new( diff --git a/tests/tracked_fn_orphan_escape_hatch.rs b/tests/tracked_fn_orphan_escape_hatch.rs index 25d2d7f4c..5a94b86ed 100644 --- a/tests/tracked_fn_orphan_escape_hatch.rs +++ b/tests/tracked_fn_orphan_escape_hatch.rs @@ -14,7 +14,7 @@ struct MyInput { #[derive(Debug, Clone, Copy, PartialEq, Eq)] struct NotUpdate<'a>(PhantomData &'a ()>); -#[salsa::tracked(unsafe(non_update_return_type))] +#[salsa::tracked(unsafe(non_update_types))] fn tracked_fn(db: &dyn salsa::Database, input: MyInput) -> NotUpdate<'_> { NotUpdate(PhantomData) }