Skip to content

Commit 6b46deb

Browse files
committed
Copy documentation of semver exempt to rustdoc
1 parent 49302e7 commit 6b46deb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/lib.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
//! This'll allow immediate usage of the beneficial upstream API, particularly
2121
//! around preserving span information.
2222
//!
23+
//! # Unstable Features
24+
//!
25+
//! `proc-macro2` supports exporting some methods from `proc_macro` which are
26+
//! currently highly unstable, and may not be stabilized in the first pass of
27+
//! `proc_macro` stabilizations. These features are not exported by default.
28+
//! Minor versions of `proc-macro2` may make breaking changes to them at any
29+
//! time.
30+
//!
31+
//! To enable these features, the `procmacro2_semver_exempt` config flag must be
32+
//! passed to rustc.
33+
//!
34+
//! ```sh
35+
//! RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo build
36+
//! ```
37+
//!
38+
//! Note that this must not only be done for your crate, but for any crate that
39+
//! depends on your crate. This infectious nature is intentional, as it serves
40+
//! as a reminder that you are outside of the normal semver guarantees.
41+
//!
2342
//! [`proc_macro`]: https://doc.rust-lang.org/proc_macro/
2443
//! [ts]: https://doc.rust-lang.org/proc_macro/struct.TokenStream.html
2544

0 commit comments

Comments
 (0)