#![warn(
clippy::pedantic,
future_incompatible,
missing_debug_implementations,
missing_docs,
nonstandard_style,
rust_2018_idioms,
rust_2021_compatibility,
unused
)]
#![allow(
clippy::module_name_repetitions,
clippy::no_effect_underscore_binding,
clippy::similar_names
)]
#![doc = include_str!("../README.md")]
#![cfg_attr(feature = "debug-to-file", feature(proc_macro_span))]
use expect_call::CallMode;
use proc_macro::TokenStream;
mod expect_call;
mod misc;
mod mock;
#[proc_macro]
#[cfg(not(doctest))]
pub fn mock(input: TokenStream) -> TokenStream {
mock::exec(input.into()).into()
}
#[proc_macro]
#[cfg(not(doctest))]
pub fn expect_call(input: TokenStream) -> TokenStream {
expect_call::exec(input.into(), CallMode::Static).into()
}
#[proc_macro]
#[cfg(not(doctest))]
pub fn expect_method_call(input: TokenStream) -> TokenStream {
expect_call::exec(input.into(), CallMode::Method).into()
}