Skip to content

Commit 9ac6af8

Browse files
committed
Auto merge of #7928 - ehuss:features-current-doc, r=alexcrichton
Try to clarify how feature flags work on the "current" package. It's a bit confusing, even with an explanation, but maybe it will help. Hopefully some day in the future feature selection won't be so wonky.
2 parents 9c29861 + 7551730 commit 9ac6af8

27 files changed

+193
-18
lines changed

src/doc/man/generated/cargo-bench.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ <h3 id="cargo_bench_target_selection">Target Selection</h3>
204204
<div class="sect2">
205205
<h3 id="cargo_bench_feature_selection">Feature Selection</h3>
206206
<div class="paragraph">
207+
<p>The feature flags allow you to control the enabled features for the "current"
208+
package. The "current" package is the package in the current directory, or the
209+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
210+
workspace, then the default features are selected for all workspace members,
211+
or all features if <code>--all-features</code> is specified.</p>
212+
</div>
213+
<div class="paragraph">
207214
<p>When no feature options are given, the <code>default</code> feature is activated for
208215
every selected package.</p>
209216
</div>

src/doc/man/generated/cargo-build.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ <h3 id="cargo_build_target_selection">Target Selection</h3>
133133
<div class="sect2">
134134
<h3 id="cargo_build_feature_selection">Feature Selection</h3>
135135
<div class="paragraph">
136+
<p>The feature flags allow you to control the enabled features for the "current"
137+
package. The "current" package is the package in the current directory, or the
138+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
139+
workspace, then the default features are selected for all workspace members,
140+
or all features if <code>--all-features</code> is specified.</p>
141+
</div>
142+
<div class="paragraph">
136143
<p>When no feature options are given, the <code>default</code> feature is activated for
137144
every selected package.</p>
138145
</div>

src/doc/man/generated/cargo-check.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ <h3 id="cargo_check_target_selection">Target Selection</h3>
137137
<div class="sect2">
138138
<h3 id="cargo_check_feature_selection">Feature Selection</h3>
139139
<div class="paragraph">
140+
<p>The feature flags allow you to control the enabled features for the "current"
141+
package. The "current" package is the package in the current directory, or the
142+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
143+
workspace, then the default features are selected for all workspace members,
144+
or all features if <code>--all-features</code> is specified.</p>
145+
</div>
146+
<div class="paragraph">
140147
<p>When no feature options are given, the <code>default</code> feature is activated for
141148
every selected package.</p>
142149
</div>

src/doc/man/generated/cargo-doc.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ <h3 id="cargo_doc_target_selection">Target Selection</h3>
115115
<div class="sect2">
116116
<h3 id="cargo_doc_feature_selection">Feature Selection</h3>
117117
<div class="paragraph">
118+
<p>The feature flags allow you to control the enabled features for the "current"
119+
package. The "current" package is the package in the current directory, or the
120+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
121+
workspace, then the default features are selected for all workspace members,
122+
or all features if <code>--all-features</code> is specified.</p>
123+
</div>
124+
<div class="paragraph">
118125
<p>When no feature options are given, the <code>default</code> feature is activated for
119126
every selected package.</p>
120127
</div>

src/doc/man/generated/cargo-fix.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ <h3 id="cargo_fix_target_selection">Target Selection</h3>
213213
<div class="sect2">
214214
<h3 id="cargo_fix_feature_selection">Feature Selection</h3>
215215
<div class="paragraph">
216+
<p>The feature flags allow you to control the enabled features for the "current"
217+
package. The "current" package is the package in the current directory, or the
218+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
219+
workspace, then the default features are selected for all workspace members,
220+
or all features if <code>--all-features</code> is specified.</p>
221+
</div>
222+
<div class="paragraph">
216223
<p>When no feature options are given, the <code>default</code> feature is activated for
217224
every selected package.</p>
218225
</div>

src/doc/man/generated/cargo-install.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ <h3 id="cargo_install_install_options">Install Options</h3>
203203
<div class="sect2">
204204
<h3 id="cargo_install_feature_selection">Feature Selection</h3>
205205
<div class="paragraph">
206+
<p>The feature flags allow you to control the enabled features for the "current"
207+
package. The "current" package is the package in the current directory, or the
208+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
209+
workspace, then the default features are selected for all workspace members,
210+
or all features if <code>--all-features</code> is specified.</p>
211+
</div>
212+
<div class="paragraph">
206213
<p>When no feature options are given, the <code>default</code> feature is activated for
207214
every selected package.</p>
208215
</div>

src/doc/man/generated/cargo-metadata.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ <h3 id="cargo_metadata_output_options">Output Options</h3>
312312
<div class="sect2">
313313
<h3 id="cargo_metadata_feature_selection">Feature Selection</h3>
314314
<div class="paragraph">
315+
<p>The feature flags allow you to control the enabled features for the "current"
316+
package. The "current" package is the package in the current directory, or the
317+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
318+
workspace, then the default features are selected for all workspace members,
319+
or all features if <code>--all-features</code> is specified.</p>
320+
</div>
321+
<div class="paragraph">
315322
<p>When no feature options are given, the <code>default</code> feature is activated for
316323
every selected package.</p>
317324
</div>

src/doc/man/generated/cargo-package.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ <h3 id="cargo_package_compilation_options">Compilation Options</h3>
145145
<div class="sect2">
146146
<h3 id="cargo_package_feature_selection">Feature Selection</h3>
147147
<div class="paragraph">
148+
<p>The feature flags allow you to control the enabled features for the "current"
149+
package. The "current" package is the package in the current directory, or the
150+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
151+
workspace, then the default features are selected for all workspace members,
152+
or all features if <code>--all-features</code> is specified.</p>
153+
</div>
154+
<div class="paragraph">
148155
<p>When no feature options are given, the <code>default</code> feature is activated for
149156
every selected package.</p>
150157
</div>

src/doc/man/generated/cargo-publish.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ <h3 id="cargo_publish_compilation_options">Compilation Options</h3>
129129
<div class="sect2">
130130
<h3 id="cargo_publish_feature_selection">Feature Selection</h3>
131131
<div class="paragraph">
132+
<p>The feature flags allow you to control the enabled features for the "current"
133+
package. The "current" package is the package in the current directory, or the
134+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
135+
workspace, then the default features are selected for all workspace members,
136+
or all features if <code>--all-features</code> is specified.</p>
137+
</div>
138+
<div class="paragraph">
132139
<p>When no feature options are given, the <code>default</code> feature is activated for
133140
every selected package.</p>
134141
</div>

src/doc/man/generated/cargo-run.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ <h3 id="cargo_run_target_selection">Target Selection</h3>
6767
<div class="sect2">
6868
<h3 id="cargo_run_feature_selection">Feature Selection</h3>
6969
<div class="paragraph">
70+
<p>The feature flags allow you to control the enabled features for the "current"
71+
package. The "current" package is the package in the current directory, or the
72+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
73+
workspace, then the default features are selected for all workspace members,
74+
or all features if <code>--all-features</code> is specified.</p>
75+
</div>
76+
<div class="paragraph">
7077
<p>When no feature options are given, the <code>default</code> feature is activated for
7178
every selected package.</p>
7279
</div>

src/doc/man/generated/cargo-rustc.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ <h3 id="cargo_rustc_target_selection">Target Selection</h3>
128128
<div class="sect2">
129129
<h3 id="cargo_rustc_feature_selection">Feature Selection</h3>
130130
<div class="paragraph">
131+
<p>The feature flags allow you to control the enabled features for the "current"
132+
package. The "current" package is the package in the current directory, or the
133+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
134+
workspace, then the default features are selected for all workspace members,
135+
or all features if <code>--all-features</code> is specified.</p>
136+
</div>
137+
<div class="paragraph">
131138
<p>When no feature options are given, the <code>default</code> feature is activated for
132139
every selected package.</p>
133140
</div>

src/doc/man/generated/cargo-rustdoc.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ <h3 id="cargo_rustdoc_target_selection">Target Selection</h3>
143143
<div class="sect2">
144144
<h3 id="cargo_rustdoc_feature_selection">Feature Selection</h3>
145145
<div class="paragraph">
146+
<p>The feature flags allow you to control the enabled features for the "current"
147+
package. The "current" package is the package in the current directory, or the
148+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
149+
workspace, then the default features are selected for all workspace members,
150+
or all features if <code>--all-features</code> is specified.</p>
151+
</div>
152+
<div class="paragraph">
146153
<p>When no feature options are given, the <code>default</code> feature is activated for
147154
every selected package.</p>
148155
</div>

src/doc/man/generated/cargo-test.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ <h3 id="cargo_test_target_selection">Target Selection</h3>
233233
<div class="sect2">
234234
<h3 id="cargo_test_feature_selection">Feature Selection</h3>
235235
<div class="paragraph">
236+
<p>The feature flags allow you to control the enabled features for the "current"
237+
package. The "current" package is the package in the current directory, or the
238+
one specified in <code>--manifest-path</code>. If running in the root of a virtual
239+
workspace, then the default features are selected for all workspace members,
240+
or all features if <code>--all-features</code> is specified.</p>
241+
</div>
242+
<div class="paragraph">
236243
<p>When no feature options are given, the <code>default</code> feature is activated for
237244
every selected package.</p>
238245
</div>

src/doc/man/options-features.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
=== Feature Selection
22

3+
The feature flags allow you to control the enabled features for the "current"
4+
package. The "current" package is the package in the current directory, or the
5+
one specified in `--manifest-path`. If running in the root of a virtual
6+
workspace, then the default features are selected for all workspace members,
7+
or all features if `--all-features` is specified.
8+
39
When no feature options are given, the `default` feature is activated for
410
every selected package.
511

src/etc/man/cargo-bench.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-bench
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2020-01-18
5+
.\" Date: 2020-02-06
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-BENCH" "1" "2020-01-18" "\ \&" "\ \&"
10+
.TH "CARGO\-BENCH" "1" "2020-02-06" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -244,6 +244,12 @@ Benchmark all targets. This is equivalent to specifying \fB\-\-lib \-\-bins
244244
.RE
245245
.SS "Feature Selection"
246246
.sp
247+
The feature flags allow you to control the enabled features for the "current"
248+
package. The "current" package is the package in the current directory, or the
249+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
250+
workspace, then the default features are selected for all workspace members,
251+
or all features if \fB\-\-all\-features\fP is specified.
252+
.sp
247253
When no feature options are given, the \fBdefault\fP feature is activated for
248254
every selected package.
249255
.sp

src/etc/man/cargo-build.1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ Build all targets. This is equivalent to specifying \fB\-\-lib \-\-bins
144144
.RE
145145
.SS "Feature Selection"
146146
.sp
147+
The feature flags allow you to control the enabled features for the "current"
148+
package. The "current" package is the package in the current directory, or the
149+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
150+
workspace, then the default features are selected for all workspace members,
151+
or all features if \fB\-\-all\-features\fP is specified.
152+
.sp
147153
When no feature options are given, the \fBdefault\fP feature is activated for
148154
every selected package.
149155
.sp

src/etc/man/cargo-check.1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ Check all targets. This is equivalent to specifying \fB\-\-lib \-\-bins
148148
.RE
149149
.SS "Feature Selection"
150150
.sp
151+
The feature flags allow you to control the enabled features for the "current"
152+
package. The "current" package is the package in the current directory, or the
153+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
154+
workspace, then the default features are selected for all workspace members,
155+
or all features if \fB\-\-all\-features\fP is specified.
156+
.sp
151157
When no feature options are given, the \fBdefault\fP feature is activated for
152158
every selected package.
153159
.sp

src/etc/man/cargo-doc.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-doc
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2019-12-05
5+
.\" Date: 2020-02-06
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-DOC" "1" "2019-12-05" "\ \&" "\ \&"
10+
.TH "CARGO\-DOC" "1" "2020-02-06" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -116,6 +116,12 @@ Document all binary targets.
116116
.RE
117117
.SS "Feature Selection"
118118
.sp
119+
The feature flags allow you to control the enabled features for the "current"
120+
package. The "current" package is the package in the current directory, or the
121+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
122+
workspace, then the default features are selected for all workspace members,
123+
or all features if \fB\-\-all\-features\fP is specified.
124+
.sp
119125
When no feature options are given, the \fBdefault\fP feature is activated for
120126
every selected package.
121127
.sp

src/etc/man/cargo-fix.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-fix
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2019-12-19
5+
.\" Date: 2020-02-06
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-FIX" "1" "2019-12-19" "\ \&" "\ \&"
10+
.TH "CARGO\-FIX" "1" "2020-02-06" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -222,6 +222,12 @@ Fix all targets. This is equivalent to specifying \fB\-\-lib \-\-bins
222222
.RE
223223
.SS "Feature Selection"
224224
.sp
225+
The feature flags allow you to control the enabled features for the "current"
226+
package. The "current" package is the package in the current directory, or the
227+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
228+
workspace, then the default features are selected for all workspace members,
229+
or all features if \fB\-\-all\-features\fP is specified.
230+
.sp
225231
When no feature options are given, the \fBdefault\fP feature is activated for
226232
every selected package.
227233
.sp

src/etc/man/cargo-install.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-install
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2019-12-05
5+
.\" Date: 2020-02-06
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-INSTALL" "1" "2019-12-05" "\ \&" "\ \&"
10+
.TH "CARGO\-INSTALL" "1" "2020-02-06" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -295,6 +295,12 @@ If not specified, the default registry is used, which is defined by the
295295
.RE
296296
.SS "Feature Selection"
297297
.sp
298+
The feature flags allow you to control the enabled features for the "current"
299+
package. The "current" package is the package in the current directory, or the
300+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
301+
workspace, then the default features are selected for all workspace members,
302+
or all features if \fB\-\-all\-features\fP is specified.
303+
.sp
298304
When no feature options are given, the \fBdefault\fP feature is activated for
299305
every selected package.
300306
.sp

src/etc/man/cargo-metadata.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-metadata
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2019-12-05
5+
.\" Date: 2020-02-24
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-METADATA" "1" "2019-12-05" "\ \&" "\ \&"
10+
.TH "CARGO\-METADATA" "1" "2020-02-24" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -317,6 +317,12 @@ reproduction of the information within \fBCargo.toml\fP.
317317
.RE
318318
.SS "Feature Selection"
319319
.sp
320+
The feature flags allow you to control the enabled features for the "current"
321+
package. The "current" package is the package in the current directory, or the
322+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
323+
workspace, then the default features are selected for all workspace members,
324+
or all features if \fB\-\-all\-features\fP is specified.
325+
.sp
320326
When no feature options are given, the \fBdefault\fP feature is activated for
321327
every selected package.
322328
.sp

src/etc/man/cargo-package.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-package
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2019-12-19
5+
.\" Date: 2020-02-06
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-PACKAGE" "1" "2019-12-19" "\ \&" "\ \&"
10+
.TH "CARGO\-PACKAGE" "1" "2020-02-06" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -217,6 +217,12 @@ to \fBtarget\fP in the root of the workspace.
217217
.RE
218218
.SS "Feature Selection"
219219
.sp
220+
The feature flags allow you to control the enabled features for the "current"
221+
package. The "current" package is the package in the current directory, or the
222+
one specified in \fB\-\-manifest\-path\fP. If running in the root of a virtual
223+
workspace, then the default features are selected for all workspace members,
224+
or all features if \fB\-\-all\-features\fP is specified.
225+
.sp
220226
When no feature options are given, the \fBdefault\fP feature is activated for
221227
every selected package.
222228
.sp

0 commit comments

Comments
 (0)