Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cargo-bench): --bench is passed in unconditionally to bench harnesses #12850

Merged
merged 1 commit into from
Oct 18, 2023
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
2 changes: 1 addition & 1 deletion src/doc/man/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Benchmarks are built with the `--test` option to `rustc` which creates a
special executable by linking your code with libtest. The executable
automatically runs all functions annotated with the `#[bench]` attribute.
Cargo passes the `--bench` flag to the test harness to tell it to run
only benchmarks.
only benchmarks, regardless of whether the harness is libtest or a custom harness.

The libtest harness may be disabled by setting `harness = false` in the target
manifest settings, in which case your code will need to provide its own `main`
Expand Down
3 changes: 2 additions & 1 deletion src/doc/man/generated_txt/cargo-bench.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ DESCRIPTION
special executable by linking your code with libtest. The executable
automatically runs all functions annotated with the #[bench] attribute.
Cargo passes the --bench flag to the test harness to tell it to run only
benchmarks.
benchmarks, regardless of whether the harness is libtest or a custom
harness.

The libtest harness may be disabled by setting harness = false in the
target manifest settings, in which case your code will need to provide
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Benchmarks are built with the `--test` option to `rustc` which creates a
special executable by linking your code with libtest. The executable
automatically runs all functions annotated with the `#[bench]` attribute.
Cargo passes the `--bench` flag to the test harness to tell it to run
only benchmarks.
only benchmarks, regardless of whether the harness is libtest or a custom harness.

The libtest harness may be disabled by setting `harness = false` in the target
manifest settings, in which case your code will need to provide its own `main`
Expand Down
2 changes: 1 addition & 1 deletion src/etc/man/cargo-bench.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Benchmarks are built with the \fB\-\-test\fR option to \fBrustc\fR which creates
special executable by linking your code with libtest. The executable
automatically runs all functions annotated with the \fB#[bench]\fR attribute.
Cargo passes the \fB\-\-bench\fR flag to the test harness to tell it to run
only benchmarks.
only benchmarks, regardless of whether the harness is libtest or a custom harness.
.sp
The libtest harness may be disabled by setting \fBharness = false\fR in the target
manifest settings, in which case your code will need to provide its own \fBmain\fR
Expand Down