Skip to content

Commit

Permalink
add failing doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Raz-Hemo committed Mar 3, 2024
1 parent 79e022f commit ae8d4a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ fn keyed(a: String) -> Option<usize> {
----
```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<String, ()> {
Ok("a".to_string())
}
```
----
```rust,no_run,ignore
use cached::proc_macro::io_cached;
use cached::AsyncRedisCache;
Expand Down

0 comments on commit ae8d4a6

Please sign in to comment.