Skip to content

Commit 86b8888

Browse files
committed
Auto merge of #6809 - ehuss:glossary-feature, r=alexcrichton
Update glossary for `feature`. Added the newly documented `target_feature` to help people disambiguate the various usages.
2 parents 95f9423 + e65516e commit 86b8888

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

src/doc/src/appendix/glossary.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,22 @@ manifest, and individual targets can specify which edition they use. See the
2121

2222
### Feature
2323

24-
A [*feature*][feature] is a named flag which allows for conditional
25-
compilation. A feature can refer to an optional dependency, or an arbitrary
26-
name defined in a `Cargo.toml` manifest that can be checked within source
27-
code.
24+
The meaning of *feature* depends on the context:
2825

29-
Cargo has [*unstable feature flags*][cargo-unstable] which can be used to
30-
enable experimental behavior of Cargo itself. The Rust compiler and Rustdoc
31-
also have their own unstable feature flags (see [The Unstable
32-
Book][unstable-book] and [The Rustdoc Book][rustdoc-unstable]).
26+
- A [*feature*][feature] is a named flag which allows for conditional
27+
compilation. A feature can refer to an optional dependency, or an arbitrary
28+
name defined in a `Cargo.toml` manifest that can be checked within source
29+
code.
30+
31+
- Cargo has [*unstable feature flags*][cargo-unstable] which can be used to
32+
enable experimental behavior of Cargo itself.
33+
34+
- The Rust compiler and Rustdoc have their own unstable feature flags (see
35+
[The Unstable Book][unstable-book] and [The Rustdoc
36+
Book][rustdoc-unstable]).
37+
38+
- CPU targets have [*target features*][target-feature] which specify
39+
capabilities of a CPU.
3340

3441
### Index
3542

@@ -172,7 +179,7 @@ manifest is located.
172179
[cargo-unstable]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html
173180
[config option]: reference/config.html
174181
[directory layout]: reference/manifest.html#the-project-layout
175-
[edition guide]: https://doc.rust-lang.org/edition-guide/
182+
[edition guide]: ../edition-guide/
176183
[edition-field]: reference/manifest.html#the-edition-field-optional
177184
[environment variable]: reference/environment-variables.html
178185
[feature]: reference/manifest.html#the-features-section
@@ -184,6 +191,7 @@ manifest is located.
184191
[path overrides]: reference/specifying-dependencies.html#overriding-with-local-dependencies
185192
[pkgid-spec]: reference/pkgid-spec.html
186193
[rustdoc-unstable]: https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html
194+
[target-feature]: ../reference/attributes/codegen.html#the-target_feature-attribute
187195
[targets]: reference/manifest.html#configuring-a-target
188196
[unstable-book]: https://doc.rust-lang.org/nightly/unstable-book/index.html
189197
[virtual]: reference/manifest.html#virtual-manifest

0 commit comments

Comments
 (0)