Call attribute macro in the implementation of another attribute macro

I cannot find how to inject a attribute macro in the result of my attribute macro.

Here is an example of a kind of injection:

use quote::quote;
use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn my_test(_: TokenStream, item: TokenStream) -> TokenStream {
    let result = quote! {
        #[test]
        #item
    };

    result.into()
}

The error generated at compile time say me that it's not possible.

So, what i want to know if we can we call another attribute macro.
The Rust documentation neither refute nor confirm it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.