Static rustc_lint_defs::builtin::PRIVATE_MACRO_USE

source ·
pub static PRIVATE_MACRO_USE: &Lint
Expand description

The private_macro_use lint detects private macros that are imported with #[macro_use].


macro_rules! foo_ { () => {}; }
use foo_ as foo;



extern crate extern_macro;

fn main() {

This will produce:

error: cannot find macro `foo` in this scope


This lint arises from overlooking visibility checks for macros in an external crate.

This is a future-incompatible lint to transition this to a hard error in the future.