Skip to main content

codespec_rust_macro/
lib.rs

1use proc_macro::TokenStream;
2
3/// Annotate a test with a spec acceptance criterion.
4///
5/// Format: `#[spec("story_name::rule_name")]`
6///
7/// This is a marker attribute — it does nothing at runtime.
8/// The codespec-rust plugin scans for these annotations to track
9/// which acceptance criteria have tests.
10#[proc_macro_attribute]
11pub fn spec(_attr: TokenStream, item: TokenStream) -> TokenStream {
12    item
13}