diff --git a/core/codegen/src/lib.rs b/core/codegen/src/lib.rs index a52d58c6..ab518799 100644 --- a/core/codegen/src/lib.rs +++ b/core/codegen/src/lib.rs @@ -26,7 +26,8 @@ //! rocket = "0.4.0-dev" //! ``` //! -//! And to import macros via `#[macro_use]` in the crate root: +//! And to import all macros, attributes, and derives via `#[macro_use]` in the +//! crate root: //! //! ```rust //! #![feature(proc_macro_hygiene, decl_macro)] @@ -36,6 +37,17 @@ //! # fn main() { rocket::ignite().mount("/", routes![hello]); } //! ``` //! +//! Or, alternatively, selectively import from the top-level scope: +//! +//! ```rust +//! #![feature(proc_macro_hygiene, decl_macro)] +//! # extern crate rocket; +//! +//! use rocket::{get, routes}; +//! # #[get("/")] fn hello() { } +//! # fn main() { rocket::ignite().mount("/", routes![hello]); } +//! ``` +//! //! # Debugging Codegen //! //! When the `ROCKET_CODEGEN_DEBUG` environment variable is set, this crate