Skip to content

Commit 1fd0e8a

Browse files
committed
Linkify some documentation
Closes #64
1 parent ce57c9d commit 1fd0e8a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/lib.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
//! A "shim crate" intended to multiplex the `proc_macro` API on to stable Rust.
1+
//! A "shim crate" intended to multiplex the [`proc_macro`] API on to stable
2+
//! Rust.
23
//!
34
//! Procedural macros in Rust operate over the upstream
4-
//! `proc_macro::TokenStream` type. This type currently is quite conservative
5-
//! and exposed no internal implementation details. Nightly compilers, however,
6-
//! contain a much richer interface. This richer interface allows fine-grained
7-
//! inspection of the token stream which avoids stringification/re-lexing and
8-
//! also preserves span information.
5+
//! [`proc_macro::TokenStream`][ts] type. This type currently is quite
6+
//! conservative and exposed no internal implementation details. Nightly
7+
//! compilers, however, contain a much richer interface. This richer interface
8+
//! allows fine-grained inspection of the token stream which avoids
9+
//! stringification/re-lexing and also preserves span information.
910
//!
10-
//! The upcoming APIs added to `proc_macro` upstream are the foundation for
11+
//! The upcoming APIs added to [`proc_macro`] upstream are the foundation for
1112
//! productive procedural macros in the ecosystem. To help prepare the ecosystem
1213
//! for using them this crate serves to both compile on stable and nightly and
1314
//! mirrors the API-to-be. The intention is that procedural macros which switch
1415
//! to use this crate will be trivially able to switch to the upstream
1516
//! `proc_macro` crate once its API stabilizes.
1617
//!
1718
//! In the meantime this crate also has a `nightly` Cargo feature which
18-
//! enables it to reimplement itself with the unstable API of `proc_macro`.
19+
//! enables it to reimplement itself with the unstable API of [`proc_macro`].
1920
//! This'll allow immediate usage of the beneficial upstream API, particularly
2021
//! around preserving span information.
22+
//!
23+
//! [`proc_macro`]: https://doc.rust-lang.org/proc_macro/
24+
//! [ts]: https://doc.rust-lang.org/proc_macro/struct.TokenStream.html
2125
2226
// Proc-macro2 types in rustdoc of other crates get linked to here.
2327
#![doc(html_root_url = "https://docs.rs/proc-macro2/0.2.2")]

0 commit comments

Comments
 (0)