Update documentation to account for stable support (#218)
* Remove `#![feature(proc_macro_hygiene)]` from documentation Closes #217 * Update comment about nightly vs stable
This commit is contained in:
parent
ca2ba2d13c
commit
b670d85595
2 changed files with 10 additions and 17 deletions
docs/content
|
@ -1,13 +1,17 @@
|
|||
# Getting started
|
||||
|
||||
## Install nightly Rust
|
||||
## Which version of Rust?
|
||||
|
||||
Maud requires the nightly version of Rust.
|
||||
If you're using `rustup`,
|
||||
see the [documentation][rustup]
|
||||
for how to install this version.
|
||||
While Maud works well
|
||||
on both stable and [nightly] versions
|
||||
of Rust,
|
||||
the error messages are slightly better
|
||||
on nightly.
|
||||
For this reason,
|
||||
it is recommended to develop using nightly Rust
|
||||
but test and deploy using stable.
|
||||
|
||||
[rustup]: https://github.com/rust-lang/rustup.rs/blob/master/README.md#working-with-nightly-rust
|
||||
[nightly]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
|
||||
|
||||
## Add Maud to your project
|
||||
|
||||
|
@ -29,8 +33,6 @@ maud = "*"
|
|||
Then save the following to `src/main.rs`:
|
||||
|
||||
```rust
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
extern crate maud;
|
||||
use maud::html;
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ maud = { version = "*", features = ["actix-web"] }
|
|||
Actix request handlers can use a `Markup` that implements the `actix_web::Responder` trait.
|
||||
|
||||
```rust
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
use maud::{html, Markup};
|
||||
use actix_web::{web, App, HttpServer};
|
||||
|
||||
|
@ -56,8 +54,6 @@ maud = { version = "*", features = ["iron"] }
|
|||
With this feature enabled, you can then build a `Response` from a `Markup` object directly. Here's an example application using Iron and Maud:
|
||||
|
||||
```rust
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
use iron::prelude::*;
|
||||
use iron::status;
|
||||
use maud::html;
|
||||
|
@ -91,9 +87,6 @@ maud = { version = "*", features = ["rocket"] }
|
|||
This adds a `Responder` implementation for the `Markup` type, so you can return the result directly:
|
||||
|
||||
```rust
|
||||
#![feature(decl_macro)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
use maud::{html, Markup};
|
||||
use rocket::{get, routes};
|
||||
use std::borrow::Cow;
|
||||
|
@ -116,8 +109,6 @@ fn main() {
|
|||
Unlike with the other frameworks, Rouille doesn't need any extra features at all! Calling `Response::html` on the rendered `Markup` will Just Work®.
|
||||
|
||||
```rust
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
use maud::html;
|
||||
use rouille::{Response, router};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue