Summary
The README documents a #[fixture] attribute macro:
#[fixture]
pub struct AmmFixture { ... }
But crucible-macros/src/lib.rs does not implement this macro. Users who try to use it get a compile error.
Expected Behaviour
The macro should:
- Require
AmmFixture::setup() -> Self to be implemented manually
- Auto-generate a
reset(&mut self) method that calls *self = Self::setup()
- Optionally generate a
Default impl that calls Self::setup()
Implementation Plan
In crucible-macros/src/lib.rs:
#[proc_macro_attribute]
pub fn fixture(_args: TokenStream, input: TokenStream) -> TokenStream {
// Parse struct definition
// Inject reset() method
// Re-emit struct unchanged
}
Acceptance Criteria
Summary
The README documents a
#[fixture]attribute macro:But
crucible-macros/src/lib.rsdoes not implement this macro. Users who try to use it get a compile error.Expected Behaviour
The macro should:
AmmFixture::setup() -> Selfto be implemented manuallyreset(&mut self)method that calls*self = Self::setup()Defaultimpl that callsSelf::setup()Implementation Plan
In
crucible-macros/src/lib.rs:Acceptance Criteria
#[fixture]attribute macro compiles correctly on a structreset()method is generatedsetup() -> Selfcrucible-macros/tests/