Update documentation to account for stable support ()

* Remove `#![feature(proc_macro_hygiene)]` from documentation

Closes 

* Update comment about nightly vs stable
This commit is contained in:
Chris Wong 2020-10-08 11:02:19 +13:00 committed by GitHub
parent ca2ba2d13c
commit b670d85595
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 17 deletions

View file

@ -1,13 +1,17 @@
# Getting started # Getting started
## Install nightly Rust ## Which version of Rust?
Maud requires the nightly version of Rust. While Maud works well
If you're using `rustup`, on both stable and [nightly] versions
see the [documentation][rustup] of Rust,
for how to install this version. 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 ## Add Maud to your project
@ -29,8 +33,6 @@ maud = "*"
Then save the following to `src/main.rs`: Then save the following to `src/main.rs`:
```rust ```rust
#![feature(proc_macro_hygiene)]
extern crate maud; extern crate maud;
use maud::html; use maud::html;

View file

@ -21,8 +21,6 @@ maud = { version = "*", features = ["actix-web"] }
Actix request handlers can use a `Markup` that implements the `actix_web::Responder` trait. Actix request handlers can use a `Markup` that implements the `actix_web::Responder` trait.
```rust ```rust
#![feature(proc_macro_hygiene)]
use maud::{html, Markup}; use maud::{html, Markup};
use actix_web::{web, App, HttpServer}; 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: 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 ```rust
#![feature(proc_macro_hygiene)]
use iron::prelude::*; use iron::prelude::*;
use iron::status; use iron::status;
use maud::html; 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: This adds a `Responder` implementation for the `Markup` type, so you can return the result directly:
```rust ```rust
#![feature(decl_macro)]
#![feature(proc_macro_hygiene)]
use maud::{html, Markup}; use maud::{html, Markup};
use rocket::{get, routes}; use rocket::{get, routes};
use std::borrow::Cow; 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®. 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 ```rust
#![feature(proc_macro_hygiene)]
use maud::html; use maud::html;
use rouille::{Response, router}; use rouille::{Response, router};