Skip to content

Commit

Permalink
Linkify some documentation
Browse files Browse the repository at this point in the history
Closes #64
  • Loading branch information
alexcrichton committed Feb 5, 2018
1 parent ce57c9d commit 1fd0e8a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
//! A "shim crate" intended to multiplex the `proc_macro` API on to stable Rust.
//! A "shim crate" intended to multiplex the [`proc_macro`] API on to stable
//! Rust.
//!
//! Procedural macros in Rust operate over the upstream
//! `proc_macro::TokenStream` type. This type currently is quite conservative
//! and exposed no internal implementation details. Nightly compilers, however,
//! contain a much richer interface. This richer interface allows fine-grained
//! inspection of the token stream which avoids stringification/re-lexing and
//! also preserves span information.
//! [`proc_macro::TokenStream`][ts] type. This type currently is quite
//! conservative and exposed no internal implementation details. Nightly
//! compilers, however, contain a much richer interface. This richer interface
//! allows fine-grained inspection of the token stream which avoids
//! stringification/re-lexing and also preserves span information.
//!
//! The upcoming APIs added to `proc_macro` upstream are the foundation for
//! The upcoming APIs added to [`proc_macro`] upstream are the foundation for
//! productive procedural macros in the ecosystem. To help prepare the ecosystem
//! for using them this crate serves to both compile on stable and nightly and
//! mirrors the API-to-be. The intention is that procedural macros which switch
//! to use this crate will be trivially able to switch to the upstream
//! `proc_macro` crate once its API stabilizes.
//!
//! In the meantime this crate also has a `nightly` Cargo feature which
//! enables it to reimplement itself with the unstable API of `proc_macro`.
//! enables it to reimplement itself with the unstable API of [`proc_macro`].
//! This'll allow immediate usage of the beneficial upstream API, particularly
//! around preserving span information.
//!
//! [`proc_macro`]: https://doc.rust-lang.org/proc_macro/
//! [ts]: https://doc.rust-lang.org/proc_macro/struct.TokenStream.html
// Proc-macro2 types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/proc-macro2/0.2.2")]
Expand Down

0 comments on commit 1fd0e8a

Please sign in to comment.