Skip to content

Commit a239539

Browse files
committed
document stability issues around libraries
1 parent 1a0cc37 commit a239539

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/doc/unstable-book/src/compiler-flags/rustc-bootstrap.md

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ Like any other unstable feature, we reserve the right to change or remove this f
3838
Although we do not take technical measures to prevent it from being used, we strongly discourage using this feature.
3939
If at all possible, please contribute to stabilizing the features you care about instead of bypassing the Rust project's stability policy.
4040

41+
For library crates, we especially discourage the use of this feature.
42+
The crates depending on you do not know that you use this feature, have little recourse if it breaks, and can be used in contexts that are hard to predict.
43+
44+
For libraries that do use this feature, please document the versions you support (including a *maximum* as well as minimum version), and a mechanism to disable it.
45+
If you do not have a mechanism to disable the use of `RUSTC_BOOTSTRAP`, consider removing its use altogether, such that people can only use your library if they are already using a nightly toolchain.
46+
This leaves the choice of whether to opt-out of Rust's stability promise up to the end user building their code.
47+
4148
## History
4249

4350
- [Allowed without a hash](https://github.com/rust-lang/rust/pull/37265) ([discussion](https://github.com/rust-lang/rust/issues/36548))

0 commit comments

Comments
 (0)