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:
Meta Vens 2026-10-11 04:05:22 +02:00
commit e72f17421e

View file

@ -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;