-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
As a newcomer to Rust, I was mislead by the crate doc example code into thinking that #[macro_use] extern crate maplit; was needed to use maplit's macros. I was using Rust edition 2018 and use maplit::{hashmap, btreeset}; was actually what I needed.
Is there some way to have the doc state what is needed for Rust edition 2015 and what is needed for Rust edition 2018? If it doesn't offend your sense of aesthetics, something as simple as the following would have been great for someone like me who was unaware of Rust edition 2018 removing almost all need for usage of extern crate:
#[macro_use] extern crate maplit; // only for Rust edition 2015
use maplit::hashmap; // for Rust edition 2018
Many thanks for your wonderful crate.
Alphare, p3t3rix and dlight
Metadata
Metadata
Assignees
Labels
No labels