Only emit lint for local macros

This commit is contained in:
Aaron Hill 2021-07-24 17:44:57 -05:00
parent 886dea2bcd
commit cf167c9c9c
No known key found for this signature in database
GPG key ID: B4087E510E98B164
3 changed files with 32 additions and 7 deletions

View file

@ -0,0 +1,4 @@
#[macro_export]
macro_rules! my_macro {
() => { true; }
}

View file

@ -0,0 +1,9 @@
// aux-build:foreign-crate.rs
// check-pass
extern crate foreign_crate;
// Test that we do not lint for a macro in a foreign crate
fn main() {
let _ = foreign_crate::my_macro!();
}