Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/feature-gate-check.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Feature Gate Checking

For the how-to steps to add, remove, rename, or stabilize feature gates,
see [Feature gates][feature-gates].

Feature gates prevent usage of unstable language and library features without a
nightly-only `#![feature(...)]` opt-in. This chapter documents the implementation
of feature gating: where gates are defined, how they are enabled, and how usage
Expand Down Expand Up @@ -138,3 +141,4 @@ Diagnostic helpers are located in [`rustc_session/src/parse.rs`].
[`rustc_attr_parsing/src/attributes/cfg.rs`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_attr_parsing/src/attributes/cfg.rs
[`rustc_feature::find_gated_cfg`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/fn.find_gated_cfg.html
[`rustc_span/src/lib.rs`]: https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_span/src/lib.rs
[feature-gates]: ./feature-gates.md
4 changes: 4 additions & 0 deletions src/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
This chapter is intended to provide basic help for adding, removing, and
modifying feature gates.

For how rustc enforces and checks feature gates in the compiler pipeline,
see [Feature Gate Checking][feature-gate-check].

Note that this is specific to *language* feature gates; *library* feature gates use [a different
mechanism][libs-gate].

[feature-gate-check]: ./feature-gate-check.md
[libs-gate]: ./stability.md

## Adding a feature gate
Expand Down
Loading