Strange compiler warning about using #[test] in macros

Hello everyone,
I am working on my first big Rust project. I am using a macro which helps me a lot when I have to write tests, here it is:

macro_rules! run_tests {
    ($($name:ident: $values:expr,) *) => {
        $(
            #[test]
            fn $name () {
                let (left, right) = $values;
                assert_eq!(left, right);
            }
         )*
    }
}

It allows me to create a test very simply, like this one:

run_tests! {
    it_works: (2 + 2, 4),
}

This worked fine until now, but since the release of Rust 1.30.0, I get the following warning during compilation:

warning: #[test] attribute should not be used on macros. Use #[cfg(test)] instead.        
   --> src/....                                                               
    |                                                                                     
100 | /     run_tests! {                                                                  
101 | |         it_works: (                                             
102 | |             2 + 2,                                             
103 | |             4                                                                          
104 | |         ),                                                                        
105 | |     }                                                                             
    | |_____^  

How can I fix this warning ? I have to use #[test] since I want this piece of code to be tested. So I don’t know what to do…
Please help me!

Cheers.

Your code builds without any warnings for me:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=9e70508e6b067f3ad721dff1d271997e

Is it possible there’s some other #[test] attribute in your file that is causing the warning?

You’re right!
There was a remaining #[test] that I forgot to remove!
Thank you for your help.

Have a very nice day!