DEV Community

Discussion on: Learn to Build a Parser in Rust for Fun and Profit

 
cthutu profile image
Matt Davies

You don't need the #[macro_use] attribute any more for 2018 edition of Rust.

Thread Thread
 
pancy profile image
Pan Chasinga

You still need this block for Pest to generate the code for you. Omitting the block exactly reproduced the issue you had. You don't need the extern crate pest; statement though.

Thread Thread
 
cthutu profile image
Matt Davies

You don't at all. #[macro_use] is not required in 2018 edition. I was able to compile it fine without it using only the 2nd change I described above. To be clear, the typo I described before was of my own doing and nothing to do with your code.