derail_macros/
lib.rs

1#![doc = env!("CARGO_PKG_DESCRIPTION")]
2//!
3//! # Versioning
4//!
5//! This package's SemVer metadata (text following `+`) indicates the minimum
6//! SemVer-compatible version of the `derail` package that this package can
7//! generate code against. Use this information to ensure that compatible
8//! versions of these two packages are being used.
9
10use proc_macro::TokenStream;
11
12mod shared;
13
14#[doc = include_str!("error.md")]
15#[proc_macro_derive(Error, attributes(derail))]
16pub fn proc_macro_error(input: TokenStream) -> TokenStream {
17    shared::error(input.into()).into()
18}