rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.16k stars 250 forks source link

Remove `local_inner_macros` usage #570

Closed EFanZh closed 1 year ago

EFanZh commented 1 year ago

Since we have dropped support for pre-1.30 compilers.

EFanZh commented 1 year ago

LGTM. I think we also remove __private_api and use ::core instead, but this way works just as well.

I think ::core is not necessarily the core crate from the standard library. Like the log crate can rename core as std, downstream crates can also rename some other crate as core:

extern crate log as core;

fn main() {
    ::core::info!("xxx");
}

See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f22b3288ec76c436dc4a7a248e346072.