How can I mock a Macro attribute in Rust

How can I mock a macro attribute in Rust, is there some library to facilitate this? For instance how could I mock #[my_macro] in the following code so it returns the function foo unchanged:

#[test]
fn test_my_macro() {
    #[my_macro]
    pub fn foo() -> u8 {
        8
    }
    
    assert_eq!(foo(), 8)

}

Please cross-reference when you ask the same question somewhere else: How can I mock a Macro attribute in Rust - Stack Overflow

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.