#![feature(proc_macro, proc_macro_non_items)]
extern crate proc_macro;

use proc_macro::{TokenStream, quote};

#[proc_macro_derive(ClippyMiniMacroTest)]
pub fn mini_macro(_: TokenStream) -> TokenStream {
    quote!(
        #[allow(unused)] fn needless_take_by_value(s: String) { println!("{}", s.len()); }
    )
}
#![feature(use_extern_macros, proc_macro_quote, proc_macro_non_items)]
extern crate proc_macro;

use proc_macro::{TokenStream, quote};

#[proc_macro_derive(ClippyMiniMacroTest)]
pub fn mini_macro(_: TokenStream) -> TokenStream {
    quote!(
        #[allow(unused)] fn needless_take_by_value(s: String) { println!("{}", s.len()); }
    )
}
Update mini-macro post proc macro stabilization
Update mini-macro post proc macro stabilization

https://github.com/rust-lang/rust/pull/52081 stabilized proc macros, but
quote is still unstable, so you need to explicitly enable that feature.
