facet_derive/
lib.rs

1#![warn(missing_docs)]
2#![doc = include_str!("../README.md")]
3
4/// Derive the Facet trait for structs, tuple structs, and enums.
5///
6/// This uses unsynn, so it's light, but it _will_ choke on some Rust syntax because...
7/// there's a lot of Rust syntax.
8#[proc_macro_derive(Facet, attributes(facet))]
9pub fn facet_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
10    facet_derive_emit::facet_derive(input.into()).into()
11}