#![deny(rust_2018_idioms)]
// works
// #[macro_use]
// extern crate clap; // 2.32.0
// err
use clap::app_from_crate;
fn main() {
app_from_crate!();
}
Err:
error: cannot find macro `crate_name!` in this scope
--> src/main.rs:11:3
|
11 | app_from_crate!();
| ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: cannot find macro `crate_version!` in this scope
--> src/main.rs:11:3
|
11 | app_from_crate!();
| ^^^^^^^^^^^^^^^^^^ help: you could try the macro: `rustc_version`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: cannot find macro `crate_authors!` in this scope
--> src/main.rs:11:3
|
11 | app_from_crate!();
| ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
playground
And it's kind of strange that rustc won't complain about unidiomatic extern crate ... even #![deny(rust_2018_idioms)] in the working one.
cc @petrochenkov
Err:
playground
And it's kind of strange that rustc won't complain about unidiomatic
extern crate ...even#![deny(rust_2018_idioms)]in the working one.cc @petrochenkov