custom_format_macros/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! This crate provides procedural macros used for the `custom-format` crate.
5
6mod fmt;
7
8use proc_macro::TokenStream;
9
10/// Parse custom format specifiers in format string and write output tokens.
11///
12/// This is an internal unstable macro and should not be used directly.
13#[proc_macro]
14#[allow(clippy::useless_conversion)]
15pub fn fmt(input: TokenStream) -> TokenStream {
16 fmt::fmt(input.into()).into()
17}