From ae8d4a6779c44ca1c588262f9292d0ec685af90e Mon Sep 17 00:00:00 2001 From: Raz-Hemo Date: Sun, 3 Mar 2024 16:51:58 +0200 Subject: [PATCH] add failing doctest --- src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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;