Remove proc_macro_hygiene feature
This commit is contained in:
parent
54f35aae28
commit
893566118d
|
@ -5,13 +5,6 @@
|
|||
This crate provides the `html!` macro for building HTML documents inside your
|
||||
Rust code using roughly [JSX] compatible syntax.
|
||||
|
||||
## Nightly Warning!
|
||||
|
||||
This crate currently needs nightly rustc, and in order to use it you'll need to
|
||||
add `#![feature(proc_macro_hygiene)]` to the top of your crate. The compiler
|
||||
will tell you to do this if you forget. When this feature stabilises, the crate
|
||||
should work on stable rustc without issues.
|
||||
|
||||
## Quick Preview
|
||||
|
||||
```rust
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
extern crate stdweb;
|
||||
extern crate typed_html;
|
||||
extern crate typed_html_macros;
|
||||
|
|
|
@ -18,6 +18,7 @@ proc-macro = true
|
|||
lalrpop-util = "0.16.1"
|
||||
ansi_term = "0.11.0"
|
||||
proc-macro2 = { version = "0.4.24", features = ["nightly"] }
|
||||
proc-macro-hack = "0.5.1"
|
||||
quote = "0.6.10"
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
#![recursion_limit = "128"]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
#![cfg_attr(can_show_location_of_runtime_parse_error, feature(proc_macro_span))]
|
||||
|
||||
extern crate ansi_term;
|
||||
extern crate lalrpop_util;
|
||||
extern crate proc_macro;
|
||||
extern crate proc_macro2;
|
||||
extern crate proc_macro_hack;
|
||||
extern crate quote;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use proc_macro_hack::proc_macro_hack;
|
||||
|
||||
mod config;
|
||||
mod declare;
|
||||
|
@ -25,7 +26,7 @@ mod span;
|
|||
/// See the crate documentation for [`typed_html`][typed_html].
|
||||
///
|
||||
/// [typed_html]: ../typed_html/index.html
|
||||
#[proc_macro]
|
||||
#[proc_macro_hack]
|
||||
pub fn html(input: TokenStream) -> TokenStream {
|
||||
let stream = lexer::unroll_stream(input.into(), false);
|
||||
let result = html::expand_html(&stream);
|
||||
|
|
|
@ -23,3 +23,4 @@ language-tags = "0.2.2"
|
|||
http = "0.1.13"
|
||||
htmlescape = "0.3.1"
|
||||
stdweb = "0.4.10"
|
||||
proc-macro-hack = "0.5.1"
|
||||
|
|
|
@ -13,7 +13,6 @@ use htmlescape::encode_minimal;
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(proc_macro_hygiene)]
|
||||
/// # use typed_html::html;
|
||||
/// # use typed_html::dom::DOMTree;
|
||||
/// # fn main() {
|
||||
|
|
|
@ -30,7 +30,6 @@ macro_rules! declare_events {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(proc_macro_hygiene)]
|
||||
/// # use typed_html::{html, for_events};
|
||||
/// # use typed_html::dom::{DOMTree, VNode};
|
||||
/// # fn main() {
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
//! This crate provides the `html!` macro for building HTML documents inside your
|
||||
//! Rust code using roughly [JSX] compatible syntax.
|
||||
//!
|
||||
//! # Nightly Warning!
|
||||
//!
|
||||
//! This crate currently needs nightly rustc, and in order to use it you'll need to
|
||||
//! add `#![feature(proc_macro_hygiene)]` to the top of your crate. The compiler
|
||||
//! will tell you to do this if you forget. When this feature stabilises, the crate
|
||||
//! should work on stable rustc without issues.
|
||||
//!
|
||||
//! # Quick Preview
|
||||
//!
|
||||
//! ```
|
||||
//! # #![feature(proc_macro_hygiene)]
|
||||
//! # use typed_html::{html, for_events};
|
||||
//! # use typed_html::dom::{DOMTree, VNode};
|
||||
//! # use typed_html::types::Metadata;
|
||||
|
@ -95,7 +87,6 @@
|
|||
//! ## Example
|
||||
//!
|
||||
//! ```
|
||||
//! # #![feature(proc_macro_hygiene)]
|
||||
//! # use typed_html::html;
|
||||
//! # use typed_html::dom::DOMTree;
|
||||
//! # use typed_html::types::{Class, SpacedSet};
|
||||
|
@ -126,7 +117,6 @@
|
|||
//! ## Example
|
||||
//!
|
||||
//! ```
|
||||
//! # #![feature(proc_macro_hygiene)]
|
||||
//! # use typed_html::{html, text};
|
||||
//! # use typed_html::dom::DOMTree;
|
||||
//! # fn main() {
|
||||
|
@ -154,7 +144,6 @@
|
|||
//! ensure you're not using any event handlers that can't be printed.
|
||||
//!
|
||||
//! ```
|
||||
//! # #![feature(proc_macro_hygiene)]
|
||||
//! # use typed_html::html;
|
||||
//! # use typed_html::dom::DOMTree;
|
||||
//! # fn main() {
|
||||
|
@ -208,11 +197,14 @@ pub extern crate htmlescape;
|
|||
extern crate http;
|
||||
extern crate language_tags;
|
||||
extern crate mime;
|
||||
extern crate proc_macro_hack;
|
||||
extern crate stdweb;
|
||||
extern crate strum;
|
||||
extern crate typed_html_macros;
|
||||
|
||||
#[doc(inline)]
|
||||
use proc_macro_hack::proc_macro_hack;
|
||||
|
||||
#[proc_macro_hack]
|
||||
pub use typed_html_macros::html;
|
||||
|
||||
pub mod dom;
|
||||
|
|
Loading…
Reference in New Issue