//! [![github]](https://github.com/wvwwvwwv/async-trait-fn) [![crates-io]](https://crates.io/crates/async-trait-fn) [![docs-rs]](https://docs.rs/async-trait-fn)
//!
//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
//!
//! # async-trait-fn
//!
//! This is a fork of the widely acclaimed [async-trait](https://github.com/dtolnay/async-trait)
//! crate. This crate adds two experimental attributes to
//! [async-trait](https://github.com/dtolnay/async-trait) that can be applied to asynchronous trait
//! methods and associated functions to avoid heap memory allocation.
//!
//! ### `unboxed`
//!
//! An `async fn` without a default implementation may get transformed into a
//! method that returns `impl Future + Send + 'async_trait` when
//! `#[macro@unboxed]` is marked on both the trait and the impl blocks.
//! `#[macro@unboxed]` requires the following unstable language features:
//! `associated_type_bounds` and `type_alias_impl_trait`.
//!
//! ```ignore
//! #![feature(associated_type_bounds, type_alias_impl_trait)]
//! # use async_trait_fn::async_trait;
//!
//! #[async_trait]
//! pub trait MyFastTrait {
//! /// `cnt_fast` returns an instance of a concrete `Future` type.
//! #[unboxed]
//! async fn cnt_fast(&self) -> usize;
//!
//! // presumably other methods
//! }
//!
//! struct MyType(usize);
//!
//! #[async_trait]
//! impl MyFastTrait for MyType {
//! #[unboxed]
//! async fn cnt_fast(&self) -> usize {
//! self.0
//! }
//! }
//!
//! let value = MyType(1);
//! let unboxed_future = value.cnt_fast();
//! ```
//!
//! The feature is not generally applicable due to a
//! [bug](https://github.com/rust-lang/rust/issues/95719) in the Rust type
//! system.
//!
//! ### `unboxed_simple`
//!
//! `unboxed_simple` is identical to `unboxed` except that all the lifetime
//! bounds in the type and parameters are substituted with a single lifetime.
extern crate proc_macro;
use crate Args;
use crate expand;
use crate Item;
use TokenStream;
use quote;
use parse_macro_input;