Skip to content

Commit e7f46f1

Browse files
Merge pull request #2765 from reddevilmidzy/connect
Add cross-links between feature gate docs
2 parents 3079be0 + d22815f commit e7f46f1

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/feature-gate-check.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Feature Gate Checking
22

3+
For the how-to steps to add, remove, rename, or stabilize feature gates,
4+
see [Feature gates][feature-gates].
5+
36
Feature gates prevent usage of unstable language and library features without a
47
nightly-only `#![feature(...)]` opt-in. This chapter documents the implementation
58
of feature gating: where gates are defined, how they are enabled, and how usage
@@ -138,3 +141,4 @@ Diagnostic helpers are located in [`rustc_session/src/parse.rs`].
138141
[`rustc_attr_parsing/src/attributes/cfg.rs`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_attr_parsing/src/attributes/cfg.rs
139142
[`rustc_feature::find_gated_cfg`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/fn.find_gated_cfg.html
140143
[`rustc_span/src/lib.rs`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_span/src/lib.rs
144+
[feature-gates]: ./feature-gates.md

src/feature-gates.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
This chapter is intended to provide basic help for adding, removing, and
44
modifying feature gates.
55

6+
For how rustc enforces and checks feature gates in the compiler pipeline,
7+
see [Feature Gate Checking][feature-gate-check].
8+
69
Note that this is specific to *language* feature gates; *library* feature gates use [a different
710
mechanism][libs-gate].
811

12+
[feature-gate-check]: ./feature-gate-check.md
913
[libs-gate]: ./stability.md
1014

1115
## Adding a feature gate

0 commit comments

Comments
 (0)