I want to use a custom derive macro that uses attributes. For Rust 2015, I wrote:
#[macro_use]
extern crate pest_derive;
#[derive(Parser)]
#[grammar = "grammar.pest"]
pub struct MyParser;
Using edition = '2018'
, extern crate
is deprecated so macro_use
is unavailable. I assumed I could write use pest_derive::{grammar,derive_parser};
, but I have to write use pest_derive::*;
.
How can I avoid the glob import? The code for the pest_derive crate is very simple, I have no idea what necessary thing *
imports that isn’t derive_parser
or grammar
.
error[E0658]: The attribute `grammar` is currently unknown to the compiler and
may have meaning added to it in the future (see issue #29642)
--> src/parser/mod.rs:10:3
|
10 | #[grammar = "rst.pest"]
| ^^^^^^^