diff --git a/src/lib.rs b/src/lib.rs index fa49324..64fe31f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -107,6 +107,22 @@ fn keyed(a: String) -> Option { ---- +```compile_fail +use cached::proc_macro::cached; + +/// Cannot use sync_writes and result_fallback together +#[cached( + result = true, + time = 1, + sync_writes = true, + result_fallback = true +)] +fn doesnt_compile() -> Result { + Ok("a".to_string()) +} +``` +---- + ```rust,no_run,ignore use cached::proc_macro::io_cached; use cached::AsyncRedisCache;