Skip to content

Commit 1ddf453

Browse files
committed
Fix some profile documentation.
1 parent 451a043 commit 1ddf453

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/doc/src/reference/profiles.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,13 @@ rpath = false
266266

267267
#### test
268268

269-
The `test` profile is used for building tests, or when benchmarks are built in
270-
debug mode with `cargo build`. By default, the `test` profile inherits the
271-
settings from the [`dev`](#dev) profile.
269+
The `test` profile is the default profile used by [`cargo test`].
270+
The `test` profile inherits the settings from the [`dev`](#dev) profile.
272271

273272
#### bench
274273

275-
The `bench` profile is used for building benchmarks, or when tests are built
276-
with the `--release` flag. By default, the `bench` profile inherits the
277-
settings from the [`release`](#release) profile.
274+
The `bench` profile is the default profile used by [`cargo bench`].
275+
The `bench` profile inherits the settings from the [`release`](#release) profile.
278276

279277
#### Build Dependencies
280278

@@ -293,7 +291,7 @@ codegen-units = 256
293291
```
294292

295293
Build dependencies otherwise inherit settings from the active profile in use, as
296-
described below.
294+
described in [Profile selection](#profile-selection).
297295

298296
### Custom profiles
299297

@@ -331,11 +329,15 @@ The profile used depends on the command, the command-line flags like
331329
`--release` or `--profile`, and the package (in the case of
332330
[overrides](#overrides)). The default profile if none is specified is:
333331

334-
* Build commands like [`cargo build`], [`cargo rustc`], [`cargo check`], and
335-
[`cargo run`]: [`dev` profile](#dev)
336-
* [`cargo test`]: [`test` profile](#test)
337-
* [`cargo bench`]: [`bench` profile](#bench)
338-
* [`cargo install`]: [`release` profile](#release)
332+
| Command | Default Profile |
333+
|---------|-----------------|
334+
| [`cargo run`], [`cargo build`],<br>[`cargo check`], [`cargo rustc`] | [`dev` profile](#dev) |
335+
| [`cargo test`] | [`test` profile](#test)
336+
| [`cargo bench`] | [`bench` profile](#bench)
337+
| [`cargo install`] | [`release` profile](#release)
338+
339+
You can switch to a different profile using the `--profile=NAME` option which will used the given profile.
340+
The `--release` flag is equivalent to `--profile=release`.
339341

340342
The selected profile applies to all Cargo targets,
341343
including [library](./cargo-targets.md#library),

0 commit comments

Comments
 (0)