mirror of https://github.com/rwf2/Rocket.git
Mention selective importing in 'rocket_codegen' docs.
This commit is contained in:
parent
328bf4b32e
commit
16a65a9a45
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue