From b670d85595f79571aff9057a3967eb04598ee788 Mon Sep 17 00:00:00 2001 From: Chris Wong <lambda.fairy@gmail.com> Date: Thu, 8 Oct 2020 11:02:19 +1300 Subject: [PATCH] Update documentation to account for stable support (#218) * Remove `#![feature(proc_macro_hygiene)]` from documentation Closes #217 * Update comment about nightly vs stable --- docs/content/getting-started.md | 18 ++++++++++-------- docs/content/web-frameworks.md | 9 --------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 86b42f7..fb38a96 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -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; diff --git a/docs/content/web-frameworks.md b/docs/content/web-frameworks.md index e449032..1b1e0f3 100644 --- a/docs/content/web-frameworks.md +++ b/docs/content/web-frameworks.md @@ -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};