CultSlots compile-fail docs: a field without a key, a generic struct
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d73249365a
commit
e72f17421e
1 changed files with 14 additions and 0 deletions
|
|
@ -56,6 +56,20 @@
|
|||
//! #[derive(CultUnion)]
|
||||
//! enum Bad<T> { #[cultcache(key = 0)] A(Arm), #[cultcache(key = 1)] B(std::marker::PhantomData<T>) }
|
||||
//! ```
|
||||
//!
|
||||
//! A CultSlots field without a key, and a generic CultSlots struct:
|
||||
//!
|
||||
//! ```compile_fail
|
||||
//! use cultcache_rs::CultSlots;
|
||||
//! #[derive(CultSlots)]
|
||||
//! struct Arm { #[cultcache(key = 0)] id: String, name: String }
|
||||
//! ```
|
||||
//!
|
||||
//! ```compile_fail
|
||||
//! use cultcache_rs::CultSlots;
|
||||
//! #[derive(CultSlots)]
|
||||
//! struct Arm<T> { #[cultcache(key = 0)] id: T }
|
||||
//! ```
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue